[perf] MIME type repair step takes hours on large instances
Open
@leftybournes is already working on this.
Since Sep 16, 2026.
🌍 scaling
1. to develop
enhancement
feature: database
feature: filesystem
performance 🚀
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Running the MIME type repair step can take up to multiple hours on large instances, as the filecache table is pretty huge.
A possible solution would be to do this not within the repair steps but only start a background job from the repair step that then will do the repair in chunks.
E.g.
- Get the current largest fileid
- start a background job A with (start=0, end=fileid)
- Update the mime types in that background job but only in the chunk [start, min(start+5000, end)]
- start the background job again from that background job with (start = start + 5000, end=fileid) if needed
(5000 is just taken as an example as this should not lock the table on mysql and thus should not block the production instance too heavily).
cc @juliushaertl
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.