Skip to content

perf(preview): Optimize retriving all previews from oc_filecache - #62601

Merged
CarlSchwan merged 6 commits into
masterfrom
carl/preview-migration-job
Jul 28, 2026
Merged

perf(preview): Optimize retriving all previews from oc_filecache#62601
CarlSchwan merged 6 commits into
masterfrom
carl/preview-migration-job

Conversation

@CarlSchwan

@CarlSchwan CarlSchwan commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

Previoulsy we used a PATH LIKE expression which is fine for small instances but doesn't scale for big instance (timeout).

Manually moving accross the tree with getFolderContentsById is significantly faster as we can use the index and this also reuse common APIs from OCP/Files instead of directly manipulating the filecache with the query builder.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@CarlSchwan CarlSchwan added this to the Nextcloud 35 milestone Jul 28, 2026
@CarlSchwan CarlSchwan self-assigned this Jul 28, 2026
@CarlSchwan
CarlSchwan requested a review from a team as a code owner July 28, 2026 08:39
@CarlSchwan
CarlSchwan requested review from leftybournes and salmart-dev and removed request for a team July 28, 2026 08:39
@CarlSchwan

Copy link
Copy Markdown
Member Author

/backport! to stable33

Previoulsy we used a PATH LIKE expression which is fine for small
instances but doesn't scale for big instance (timeout).

Manually moving accross the tree with getFolderContentsById is
significantly faster as we can use the index and this also reuse common
APIs from OCP/Files instead of directly manipulating the filecache with
the query builder.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Faster than doing a commit after each file

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan force-pushed the carl/preview-migration-job branch from f6d6a23 to 0525899 Compare July 28, 2026 10:39
Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan enabled auto-merge July 28, 2026 11:14
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan merged commit 811edb0 into master Jul 28, 2026
200 of 202 checks passed
@CarlSchwan
CarlSchwan deleted the carl/preview-migration-job branch July 28, 2026 12:26
@CarlSchwan

Copy link
Copy Markdown
Member Author

/backport to stable34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants