Skip to content

[19.0][IMP][WIP] endpoint_route_handler: memoize route version per request#140

Open
JordiBForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-imp-endpoint_route_handler-version-memo
Open

[19.0][IMP][WIP] endpoint_route_handler: memoize route version per request#140
JordiBForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-imp-endpoint_route_handler-version-memo

Conversation

@JordiBForgeFlow
Copy link
Copy Markdown
Member

_endpoint_route_last_version() is part of the routing_map ormcache key, so it runs on every routing map access -- e.g. once per url_for while rendering a website page, which adds up to dozens of identical 'SELECT last_value FROM endpoint_route_version' round-trips per page on content-heavy sites. The version cannot change within a request: memoize it on the request object.

_endpoint_route_last_version() is part of the routing_map ormcache key,
so it runs on every routing map access -- e.g. once per url_for while
rendering a website page, which adds up to dozens of identical
'SELECT last_value FROM endpoint_route_version' round-trips per page on
content-heavy sites. The version cannot change within a request:
memoize it on the request object.
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @simahawk,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:19.0 mod:endpoint_route_handler Module endpoint_route_handler labels Jun 4, 2026
@JordiBForgeFlow JordiBForgeFlow changed the title [19.0][IMP] endpoint_route_handler: memoize route version per request [19.0][IMP][WIP] endpoint_route_handler: memoize route version per request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:endpoint_route_handler Module endpoint_route_handler series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants