Kelsidavis-WoWee/include
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
..
audio Add audio volume controls to settings 2026-02-05 17:32:21 -08:00
auth Use auth username for world connection 2026-02-05 18:18:15 -08:00
core Add idle yawn emote and hearth home tooltip 2026-02-08 03:39:02 -08:00
game Add mount pitch and roll for realistic taxi flight animation 2026-02-08 22:05:38 -08:00
network Fix online mode creature spawning and packet parsing 2026-02-05 21:55:52 -08:00
pipeline Add 1GB RAM cache for decompressed MPQ files 2026-02-08 22:37:29 -08:00
platform Fix hair/vendor/loot bugs, revamp spellbook with tabs and icons, clean up action bar, add talent placeholder 2026-02-06 16:04:25 -08:00
rendering Add collision query caching to reduce map traversal overhead 2026-02-08 22:30:37 -08:00
ui Add trainer dialog system with spell list UI and buy support 2026-02-08 14:33:39 -08:00