Bound MPQ archive lookup cache; remove always-on composite dumps; track texture cache entries

This commit is contained in:
Kelsi 2026-02-12 16:29:36 -08:00
parent 46c672d1c2
commit 5fda1a3157
10 changed files with 169 additions and 56 deletions

View file

@ -112,8 +112,13 @@ private:
// Cache for mapping "virtual filename" -> archive handle (or INVALID_HANDLE_VALUE for not found).
// This avoids scanning every archive for repeated lookups, which can otherwise appear as a hang
// on screens that trigger many asset probes (character select, character preview, etc.).
//
// Important: caching misses can blow up memory if the game probes many unique non-existent filenames.
// Miss caching is disabled by default and must be explicitly enabled.
mutable std::mutex fileArchiveCacheMutex_;
mutable std::unordered_map<std::string, HANDLE> fileArchiveCache_;
size_t fileArchiveCacheMaxEntries_ = 500000;
bool fileArchiveCacheMisses_ = false;
mutable std::mutex missingFileMutex_;
mutable std::unordered_set<std::string> missingFileWarnings_;