diff options
| author | Sssnowyyy <78863999+Sssnowyyy@users.noreply.github.com> | 2026-11-02 11:23:37 -0500 |
|---|---|---|
| committer | Sssnowyyy <78863999+Sssnowyyy@users.noreply.github.com> | 2026-11-02 14:53:47 -0500 |
| commit | 8748fbd542a00ab7bbfbf17210b29f8d51c3c4b5 (patch) | |
| tree | c8784791e7e4f4d65e758642a29b70fede426598 /src/video_core/buffer_cache | |
| parent | a3d67c14c86f57ec12787db0b8bb058ec8b5f73c (diff) | |
file_sys: decompress large NUP zstd members once
31b901b93b only cached a zstd member while it fit the 512 MiB cache.
Anything larger was never cached, so every Read() allocated the full
uncompressed size and decompressed the whole extent again, which makes a
multi-GB RomFS read in small chunks unusably slow. Members between 256
and 512 MiB evicted each other on alternate reads, and Insert copied the
vector so memory briefly doubled. Two threads decompressing the same
member also left a duplicate LRU entry and a wrong byte count.
The writer emits one zstd frame per member, so there are no frame
boundaries to seek by. Members larger than half the cache are now
streamed once into a temporary file under the cache directory and read
from there, using bounded memory. The file is removed when the
container is released. Smaller members stay in the LRU, which now moves
the vector in and ignores a duplicate insert.
Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
Diffstat (limited to 'src/video_core/buffer_cache')
0 files changed, 0 insertions, 0 deletions
