Repository navigation
resolve: check js_decl_scope_memo before the file/tree loads - #569
Merged
Merged
Conversation
The #566 memo sat behind read_file, js_binding_tree (format! + tree LRU + Rc clone) and two js_unit_to_byte scans — the preamble was the residual cost the memo couldn't see. A hit now needs no tree; a missing or global scope needs no source either. Two adjacent same-loop wins: is_lexically_reachable's bare regex gains a one-entry memo keyed on reference_name, and prefer_adjacent_implementations skips its HashSet build unless a .d.ts candidate exists. pretix parity exact (32799/73404/165700); resolution 4.73s -> 4.57s.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
@coderabbitai review |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #566 — the memo sat behind
read_file,js_binding_tree(aformat!key + tree-LRU +Rc::clone) and twojs_unit_to_bytescans, so hits still paid the preamble. A gate-cost analysis (names.rs gate chain) named this the top residual:Some(None)/global →Some(true)with no source read;None→Nonewith nothing; onlySome(scope)reads the file for the refPoint.is_lexically_reachable'sbareregex gets a one-entry memo keyed onreference_name(same name for every candidate in a ref's loop).prefer_adjacent_implementationsskips its HashSet build + 2 String allocs/candidate unless a.d.tscandidate exists.Validation
kernel-resolve-parity.test.ts: 8/8.