Repository navigation
fix(appstore): store the payload cache as lazy app config - #511
Merged
Merged
Conversation
Nextcloud preloads every eager app-config row on every request. The App Store payload cache (one row per managed app, ~4 MB for mail) was eager, so a dev instance carried 1,660 rows / 36 MB in that preload and paid ~300 ms on every request of every app. Read and write the keys lazy, and add a repair step that flips the rows already stored.
Contributor
Quality Report — ConductionNL/versioniq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| composer | ✅ | ✅ 32/32 | |||
| npm | ✅ | ✅ 302/302 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-10-06 13:28 UTC
Download the full PDF report from the workflow artifacts.
…eLazy A repair step only runs when <version> moves; without it occ upgrade answers "No upgrade required" and the payload rows stay eager (gate-110).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The App Store payload cache (
appstore.payload.*andappstore.payload_ts.*) is now lazy app config, on read and on write. A new repair step,MarkPayloadCacheLazy, marks the rows already stored as lazy, on upgrade and on install.Why
Nextcloud loads every non-lazy app-config row of every app on every request. The cache holds one payload per managed app (about 4 MB for mail alone), so on the dev instance it put 1,660 rows and 36 MB into that preload. Measured on 2026-10-06:
status.phpThat made every page of the instance slow, not only this app's.
Verified
testPayloadCacheIsReadAndWrittenLazyfails against the old source ("must be written lazy") and passes with the fix.MarkPayloadCacheLazyTest: flips only payload keys, and one failing key does not abort the step.composer check:strict: lint and psalm green.Inherited
cs:checkflags@paramalignment inRemoveRetiredCronJobs.phpand its test. Neither file is touched here.🤖 Generated with Claude Code