Skip to content

[6.x] Memoize version read - #15521

Open
daun wants to merge 1 commit into
statamic:6.xfrom
daun:perf/lazy-version
Open

daun wants to merge 1 commit into
statamic:6.xfrom
daun:perf/lazy-version

Conversation

@daun

@daun daun commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Hold on to the resolved version string for the lifetime of the current fpm worker. This avoids ~5-15ms of duplicate work reading the composer version in control panel requests (depending on composer.lock size). It's currently resolved twice, once in HandleAuthenticatedInertiaRequests and once in JavascriptComposer. So at minimum this avoids the second call, and at best it memoizes while the worker is alive.

This branch has not been deployed

No deployments
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