-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
Some comments on #9291 that I don't want to lose:
- There is another loop over source mappings, looking at GeneratedSpan, that could possibly be changed to a binary search, though it does do a little extra logic which needs to be checked (Use a binary search when trying to find source mappings #9291 (comment))
- There is a loop over source mappings, looking at OriginalSpan, which can't be changed to a binary search due to them being out-of-order, but we should benchmark if there is a number of mappings at which it makes more sense to re-sort then binary search. (Use a binary search when trying to find source mappings #9291 (comment))
- We could also look at looping backwards if the span we're looking for is in the last half of the file. Being out of order, this is no guarantee of an improvement, but worst case should still be the same.
- We could also look at sorting and caching an ordered list, if we expect multiple calls are likely for the same document version
- We should fix the type of SourceMappings in the compiler, when possible, to a concrete
- There is a portion of code that finds candidate mappings by constructing a list and only using the first element, which could be improved to not need a list.
Reactions are currently unavailable