Skip to content

perf(files): cache the mimetype table - #65430

Merged
provokateurin merged 1 commit into
masterfrom
carl/cache-mimetypes
Oct 13, 2026
Merged

provokateurin merged 1 commit into
masterfrom
carl/cache-mimetypes

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Every request that reads a file cache entry loaded the whole mimetypes table from the database. Keep it in the local cache instead. Mimetypes are only ever added, so a stale cache can only miss new mimetypes: on a miss the table is loaded from the database again, at most once per request.

TODO

  • ...

Checklist

AI (if applicable)

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

Every request that reads a file cache entry loaded the whole mimetypes
table from the database. Keep it in the local cache instead. Mimetypes
are only ever added, so a stale cache can only miss new mimetypes: on a
miss the table is loaded from the database again, at most once per
request.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan CarlSchwan added this to the Nextcloud 36 milestone Oct 12, 2026
@CarlSchwan CarlSchwan self-assigned this Oct 12, 2026
@CarlSchwan
CarlSchwan requested a review from a team as a code owner October 12, 2026 15:13
@CarlSchwan
CarlSchwan requested review from icewind1991 and removed request for a team October 12, 2026 15:13
@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Oct 12, 2026
@provokateurin
provokateurin merged commit a7de770 into master Oct 13, 2026
220 checks passed
@provokateurin
provokateurin deleted the carl/cache-mimetypes branch October 13, 2026 06:59
@CarlSchwan

Copy link
Copy Markdown
Member Author

/backport to stable35

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.

5 participants