Skip to content

Perf: Optimize pages loading (Filecache path like approach)#2549

Open
Koc wants to merge 1 commit into
mainfrom
feature/optimize-pages-loading-v2
Open

Perf: Optimize pages loading (Filecache path like approach)#2549
Koc wants to merge 1 commit into
mainfrom
feature/optimize-pages-loading-v2

Conversation

@Koc
Copy link
Copy Markdown
Contributor

@Koc Koc commented May 31, 2026

📝 Summary

This is alternative approach to #2390 that fixes same performance issue (closes #2380).

Benefits comparing to previous implementation:

  • no extra columns
  • no migration to re-process already existent page
  • no listeners
  • much simpler implementation

So, we're just load all necessary pages via simple query SELECT * FROM filecache WHERE storage_id = <storageId> AND path LIKE 'appdata_<instanceId>/collectives/<collectiveId>/%'

🖼️ Screenshots

image

Collective with 390 pages with various nesting level

🏚️ Before 🏡 After
747 queries - depends on pages count and nesting level 50 queries - more or less constant
image image

🚧 TODO

  • As a future improvement we can consider to add index to filecache table to storage_id, path columns (but this requires extra PR to nextcloud/server)

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@Koc Koc force-pushed the feature/optimize-pages-loading-v2 branch 3 times, most recently from e644e8e to 5d10baa Compare May 31, 2026 13:26
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the feature/optimize-pages-loading-v2 branch from 5d10baa to 5e6b2e9 Compare May 31, 2026 13: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.

Optimize performance of the pages loading by stopping using filesystem always

1 participant