-
-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(wasm): generate scope text with visitor #5264
perf(wasm): generate scope text with visitor #5264
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @overlookmotel and the rest of your teammates on Graphite |
CodSpeed Performance ReportMerging #5264 will not alter performanceComparing Summary
|
I am considering merging scope and symbol into one, based on oxc/crates/oxc_semantic/tests/main.rs Lines 9 to 96 in 813e10c
Because I think keeping the consistent with our semantic snapshot makes it easy to debug the bugs |
I see your point of it being easier for debugging if the format is consistent. But I think visually it might be a bit too much information all in one place to combine the 2. It'd work if you had expand/contract buttons so you didn't have to see everything at once. Maybe that's achievable with our new fancy Playground? |
Merge activity
|
Follow-on after #5232. `oxc_wasm` build scopes text with a single AST traversal. Previous implementation was O($n^2$). If we can assume scopes are listed in traversal order, then we could do it a bit more efficiently just from `ScopeTree`, but this approach of using `Visit` will handle out-of-order scope IDs (which you'd get if printing a post-transform `ScopeTree`). Also reduce creating and discarding `String`s for indentation - reuse a single string instead.
bc32c2e
to
6a49dc3
Compare
…o fix/jest-vitest-compat * 'fix/jest-vitest-compat' of github.com:eryue0220/oxc: fix(wasm): reference ast from prettier (oxc-project#5268) feat(wasm): output symbol IDs in scope tree (oxc-project#5266) perf(wasm): generate scope text with visitor (oxc-project#5264)
Follow-on after #5232.$n^2$ ).
oxc_wasm
build scopes text with a single AST traversal. Previous implementation was O(If we can assume scopes are listed in traversal order, then we could do it a bit more efficiently just from
ScopeTree
, but this approach of usingVisit
will handle out-of-order scope IDs (which you'd get if printing a post-transformScopeTree
).Also reduce creating and discarding
String
s for indentation - reuse a single string instead.