nextcloud / nextcloud/server

perf: Delete previews in one go instead of individually

Open
#57,593 1 comment 0 reactions 1 assignee View on GitHub

@CarlSchwan is already working on this.

Since Jan 16, 2026.

🌍 scaling 0. Needs triage enhancement feature: previews and thumbnails performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

With the new preview backend, we are deleting preview individually, this is probably expensive and slow.

https://github.com/nextcloud/server/blob/b6e90acdb64001b4c7d22a863e5dbb0c995ed208/lib/private/Preview/PreviewService.php#L112-L132

Shouldn't we do it in one go?

  1. Flush the preview table
  2. Delete the preview directory

Previously it was done individually too.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.