inspectors: don't mmap files for mime type detection
Metadata
Current evaluation
Merged PR #139 (commit 1d4f0e5) replaced mmap-based artifact access with regular reads for MIME detection, avoiding whole-file mappings and reducing peak memory use.
Resolution: closed resolved
Reason: PR #139 was merged after approval. Commit 1d4f0e5 removes mmap use from artifact MIME detection and uses regular file access instead.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Mmapping artefact files for mime type detection result in high peak
memory allocation by the mimetype module when the entire file
is mapped. Restricting the detection buffer size doesn't provide
any advantage over regular file access, so stop using mmap.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #139 (commit 1d4f0e5) replaced mmap-based artifact access with regular reads for MIME detection, avoiding whole-file mappings and reducing peak memory use. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #139 replaced mmap-based artifact access with standard reads for MIME detection, reducing the high peak memory allocation caused by mapping entire files. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to replace memory-mapped file access with standard reads for MIME type detection in inspectors, eliminating high peak memory allocation. Approved by two reviewers, passed CI, and modified 16 files. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
No related issues found above the similarity threshold.