diff options
| author | Dan Engelbrecht <[email protected]> | 2024-09-17 15:05:40 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-09-17 15:05:40 +0200 |
| commit | d020b6522b2d962db67f8a66410e74d61cf3da24 (patch) | |
| tree | 44985edb66e5405df2d3a57c291490b2a0485337 /src/zenstore/blockstore.cpp | |
| parent | Running the public github release mirroring as part of creating the release (... (diff) | |
| download | zen-d020b6522b2d962db67f8a66410e74d61cf3da24.tar.xz zen-d020b6522b2d962db67f8a66410e74d61cf3da24.zip | |
gc performance improvements (#160)
* optimized ValidateCbUInt
* optimized iohash comparision
* replace unordered set/map with tsl/robin set/map in blockstore
* increase max buffer size when writing cache bucket sidecar
* only store meta data for files < 4Gb
* faster ReadAttachmentsFromMetaData
* remove memcpy call in BlockStoreDiskLocation
* only write cache bucket state to disk if GC deleted anything
Diffstat (limited to 'src/zenstore/blockstore.cpp')
| -rw-r--r-- | src/zenstore/blockstore.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp index e20888ae4..00a38c3b6 100644 --- a/src/zenstore/blockstore.cpp +++ b/src/zenstore/blockstore.cpp @@ -273,7 +273,7 @@ BlockStore::Initialize(const std::filesystem::path& BlocksBasePath, uint64_t Max ZEN_ASSERT(MaxBlockCount > 0); ZEN_ASSERT(IsPow2(MaxBlockCount)); - std::unordered_map<uint32_t, uint64_t> FoundBlocks; + tsl::robin_map<uint32_t, uint64_t> FoundBlocks; m_TotalSize = 0; m_BlocksBasePath = BlocksBasePath; @@ -1302,8 +1302,8 @@ BlockStore::IterateChunks(const std::span<const BlockStoreLocation>& ChunkLocati ZEN_LOG_SCOPE("iterating chunks from '{}'", m_BlocksBasePath); - std::unordered_map<uint32_t, size_t> BlockIndexToBlockChunks; - std::vector<std::vector<size_t>> BlocksChunks; + tsl::robin_map<uint32_t, size_t> BlockIndexToBlockChunks; + std::vector<std::vector<size_t>> BlocksChunks; for (size_t ChunkIndex = 0; ChunkIndex < ChunkLocations.size(); ++ChunkIndex) { |