diff options
| author | Dan Engelbrecht <[email protected]> | 2023-08-21 13:09:37 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-21 13:09:37 +0200 |
| commit | 21066f050050d1e7141975e70f557de91bae1a2a (patch) | |
| tree | 54854a632e0a7b85f4217a5dafcb54f61480e335 /src/zenstore/compactcas.h | |
| parent | use atexit hook to shut down tracing (#369) (diff) | |
| download | zen-21066f050050d1e7141975e70f557de91bae1a2a.tar.xz zen-21066f050050d1e7141975e70f557de91bae1a2a.zip | |
use robinmap in compact cas (#368)
* Use robin-map in compactcas for 30% faster CasContainerStrategy::CollectGarbage
* use robin_set in ProjectStore::Oplog::GatherReferences and BlockStore::ReclaimSpace
* changelog
Diffstat (limited to 'src/zenstore/compactcas.h')
| -rw-r--r-- | src/zenstore/compactcas.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/zenstore/compactcas.h b/src/zenstore/compactcas.h index b149fd682..eff9cc135 100644 --- a/src/zenstore/compactcas.h +++ b/src/zenstore/compactcas.h @@ -11,7 +11,10 @@ #include <atomic> #include <limits> -#include <unordered_map> + +ZEN_THIRD_PARTY_INCLUDES_START +#include <tsl/robin_map.h> +ZEN_THIRD_PARTY_INCLUDES_END namespace spdlog { class logger; @@ -88,9 +91,9 @@ private: std::filesystem::path m_BlocksBasePath; BlockStore m_BlockStore; - RwLock m_LocationMapLock; - typedef std::unordered_map<IoHash, BlockStoreDiskLocation, IoHash::Hasher> LocationMap_t; - LocationMap_t m_LocationMap; + RwLock m_LocationMapLock; + typedef tsl::robin_map<IoHash, BlockStoreDiskLocation, IoHash::Hasher> LocationMap_t; + LocationMap_t m_LocationMap; }; void compactcas_forcelink(); |