[scopes] Batch generated locations #5892
[scopes] Batch generated locations #5892
Conversation
9dd93a8
to
3c86ad4
Compare
@@ -0,0 +1,68 @@ | |||
export function generateClientScope( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing // @flow
@@ -0,0 +1,27 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing // @flow
const end = await sourceMaps.getGeneratedLocation(pos.end, source); | ||
// console.log(`> getting locations ${pos.start.line} ${pos.end.line}`); | ||
const start = getGeneratedLocation(pos.start, generatedLocations); | ||
const end = getGeneratedLocation(pos.end, generatedLocations); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to delay this, because this is the logic I'm already going to be changing to updating how the ranges work. Maybe it would make more sense for me to make that a batched lookup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that works!
logan will go a different direction |
Fixes Issue: #5561
Summary of Changes
This is an attempt to speedup the mapping logic by consolidating the source map location fetching.
I dont know if this was the slowest path though... I do know that this is faster when there are 19K locations...
The first thing here is the refactor of mapScopes, which i did to learn the layout of the code...
The code also relies on a new batch pr.
Here's a new profile after the fact
Here's an STR:
python -m SimpleHTTPServer 3000