Skip to content

Improve caching for effects resolution - #1380

Open
lionel- wants to merge 5 commits into
oak-nse/20-ambiguous-effectsfrom
oak-nse/21-effect-cache
Open

Improve caching for effects resolution#1380
lionel- wants to merge 5 commits into
oak-nse/20-ambiguous-effectsfrom
oak-nse/21-effect-cache

Conversation

@lionel-

@lionel- lionel- commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Progress towards #1338

  • Effect resolution now memoizes per (name, attached) pair to avoid rewalking the cross-file layer chain on every call.

  • The static effect registry (base, magrittr, rlang, S7, shiny, testthat, withr) is now indexed by name in a LazyLock<FxHashMap> built once, to avoid a linear scan on every lookup()/annotates() call.

  • ImportLayer::From now holds the Package itself instead of a freshly-rebuilt HashMap of its importFrom table. The map is now cached by its own query (Package::imported_from()).

Positron Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

@lionel-
lionel- force-pushed the oak-nse/21-effect-cache branch from 5961947 to 3f068cf Compare July 31, 2026 07:08
@lionel-
lionel- force-pushed the oak-nse/21-effect-cache branch 4 times, most recently from 2a43818 to a6062ec Compare July 31, 2026 12:28
@lionel-
lionel- force-pushed the oak-nse/21-effect-cache branch from a6062ec to fe3de07 Compare July 31, 2026 14:23
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