Skip to content

Improve caching for effects resolution - #1380

Merged
lionel- merged 6 commits into
mainfrom
oak-nse/21-effect-cache
Aug 3, 2026
Merged

Improve caching for effects resolution#1380
lionel- merged 6 commits into
mainfrom
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 3 times, most recently from cd696e0 to 5f44040 Compare August 3, 2026 13:17
@lionel-
lionel- force-pushed the oak-nse/21-effect-cache branch from 5f44040 to 27271ec Compare August 3, 2026 16:18
Base automatically changed from oak-nse/20-ambiguous-effects to main August 3, 2026 16:37
@lionel-
lionel- force-pushed the oak-nse/21-effect-cache branch from 27271ec to ce594dd Compare August 3, 2026 16:38
@lionel-
lionel- merged commit 8244e6f into main Aug 3, 2026
16 of 17 checks passed
@lionel-
lionel- deleted the oak-nse/21-effect-cache branch August 3, 2026 16:38
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant