Skip to content

A configuration value is resolved once per request - #8

Merged
paales merged 1 commit into
mainfrom
config-value-memo
Sep 24, 2026
Merged

paales merged 1 commit into
mainfrom
config-value-memo

Conversation

@paales

@paales paales commented Sep 24, 2026

Copy link
Copy Markdown
Member

Written by 🤖:

ValueMemo answers the second read of a configuration value by scope, scope code and path from a request memo, under the config_memo switch. A read with a scope object as code is not memoised. A configuration clean, a mutable set and a switch of the current store empty the memo, and the memo resets after a request in a worker.

On a Luma search page with 176 configurables the configuration reads went from 7% to 2% of the render. The rendered parity gate stays identical.

🤖 Generated with Claude Code

The second read of a value by scope, scope code and path answers from a request memo, so a page that reads the same settings per card skips the scope resolution and the type lookup for them. A configuration clean, a mutable set and a switch of the current store empty the memo.
@paales
paales merged commit b9d6868 into main Sep 24, 2026
6 checks passed
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