Kelsidavis-WoWee/include/pipeline
Kelsi 27d0496894 Add 1GB RAM cache for decompressed MPQ files
Eliminates repeated MPQ decompression overhead by caching decompressed
files in RAM with LRU eviction. Major performance improvement for file access.

Problem:
- Every readFile() call decompresses from MPQ (expensive!)
- M2 models, textures, WMO files decompressed repeatedly
- No caching of decompressed data
- MPQ decompression is CPU-intensive (zlib/bzip2)

Solution:
- Added 1GB LRU file cache to AssetManager
- Cache hit: instant return of decompressed data
- Cache miss: decompress once, cache for future access
- LRU eviction when cache full (removes least recently used)
- Don't cache files >100MB (avoid giant WMO chunks)
- Thread-safe with existing readMutex

Implementation:
- CachedFile struct: data + lastAccessTime
- fileCacheAccessCounter for LRU tracking
- Hit/miss statistics for monitoring
- Budget: 1GB (modern RAM easily handles this)

Performance impact:
- First load: same speed (decompress + cache)
- Subsequent loads: instant (no decompression)
- Expected 70-90% hit rate during normal play
- Huge benefit for frequently accessed models

Cache stats logged on shutdown to monitor effectiveness.
2026-02-08 22:37:29 -08:00
..
adt_loader.hpp Fix heightmap loading detection and widen wall collision radius 2026-02-05 18:01:16 -08:00
asset_manager.hpp Add 1GB RAM cache for decompressed MPQ files 2026-02-08 22:37:29 -08:00
blp_loader.hpp Add attribution and source citations for open source release 2026-02-02 22:09:33 -08:00
dbc_loader.hpp Add attribution and source citations for open source release 2026-02-02 22:09:33 -08:00
m2_loader.hpp Add M2 collision mesh parsing and mesh-based wall/floor collision 2026-02-08 19:56:17 -08:00
mpq_manager.hpp Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00
terrain_mesh.hpp Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00
wmo_loader.hpp Add WMO portal culling infrastructure and fix single-player character flow 2026-02-05 15:31:00 -08:00