Skip to content

[6.x] Memoize version read - #15521

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
daun:perf/lazy-version
Sep 28, 2026
Merged

jasonvarga merged 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.

@jasonvarga
jasonvarga merged commit 03c1f0e into statamic:6.x Sep 28, 2026
62 checks passed
@daun
daun deleted the perf/lazy-version branch September 29, 2026 04:31
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.

2 participants