source_span icon indicating copy to clipboard operation
source_span copied to clipboard

SourceFile sets up _lineStarts eagerly

Open klavs opened this issue 6 years ago • 0 comments
trafficstars

The body of the SourceFile.decoded could be executed lazily. It would increase the performance for cases when serialisation of spans is not necessary. For example, doing successful AST transformations without needing to report errors.

https://github.com/dart-lang/source_span/blob/f9343087ba37f0cb089648b75fc30d99d2eb2c26/lib/src/file.dart#L73-L85

klavs avatar Jul 20 '19 13:07 klavs