Optimize pack file loading

- Add thread-local ZSTD decompression context reuse
- Integrate BufferPool for temporary buffers
- PackManager auto-uses BufferPool for all GetFile calls
- Thread-safe pack loading with mutex
This commit is contained in:
savis
2026-01-03 20:37:32 +01:00
parent 0958ea6214
commit e55fc4db17
4 changed files with 78 additions and 7 deletions

View File

@@ -4,6 +4,8 @@
#include "config.h"
class CBufferPool;
class CPack : public std::enable_shared_from_this<CPack>
{
public:
@@ -12,6 +14,7 @@ public:
bool Open(const std::string& path, TPackFileMap& entries);
bool GetFile(const TPackFileEntry& entry, TPackFile& result);
bool GetFileWithPool(const TPackFileEntry& entry, TPackFile& result, CBufferPool* pPool);
private:
TPackFileHeader m_header;