Skip to content

resolve: key local_declaration_scope memo by node id - #571

Merged
bompus merged 1 commit into
fork/consolidatedfrom
perf/key-interning
Oct 28, 2026
Merged

bompus merged 1 commit into
fork/consolidatedfrom
perf/key-interning

Conversation

@bompus

@bompus bompus commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • local_declaration_scope memoized into its own local_decl_scope_memo keyed by n.id — the shared lexical_scope_memo needed a local:-prefixed format! (a String alloc per call) purely for namespacing; a dedicated map makes the hit path alloc-free.
  • parsed_tree key-interning evaluated and skipped: its format!("{}\0{}", lang, path) key would need a Borrow key wrapper for alloc-free get — larger complexity than the remaining win justifies.

Test plan

  • kernel builds (build-kernel.mjs --quick)
  • __tests__/kernel-resolve-parity.test.ts — 8/8

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between e31b894 and b240fa3.

Files selected for processing: 2
  • codegraph-kernel/src/resolve/mod.rs
  • codegraph-kernel/src/resolve/resolver_upstream.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bompus

bompus commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Its own map removes the per-call "local:{id}" format! it used only to
namespace-share lexical_scope_memo; the borrowed get needs no alloc.
@bompus
bompus force-pushed the perf/key-interning branch from 73badd6 to b240fa3 Compare October 28, 2026 01:34
@bompus

bompus commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bompus
bompus merged commit dfb8866 into fork/consolidated Oct 28, 2026
4 checks passed
@bompus
bompus deleted the perf/key-interning branch October 28, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant