From: Remi Gacogne Date: Fri, 27 Jun 2025 10:15:48 +0000 (+0200) Subject: lmdb-safe: Use unordered maps for the transaction maps X-Git-Tag: rec-5.3.0-alpha2~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883aec59cf56f9345b0a229ed7af35490a113494;p=thirdparty%2Fpdns.git lmdb-safe: Use unordered maps for the transaction maps We don't need the maps to be ordered, and unordered maps are usually slightly faster. Signed-off-by: Remi Gacogne --- diff --git a/ext/lmdb-safe/lmdb-safe.hh b/ext/lmdb-safe/lmdb-safe.hh index 80f4f408a4..049311a502 100644 --- a/ext/lmdb-safe/lmdb-safe.hh +++ b/ext/lmdb-safe/lmdb-safe.hh @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -116,8 +116,8 @@ public: private: std::mutex d_openmut; std::shared_mutex d_countmutex; - std::map> d_RWtransactionsOut; - std::map> d_ROtransactionsOut; + std::unordered_map> d_RWtransactionsOut; + std::unordered_map> d_ROtransactionsOut; }; std::shared_ptr getMDBEnv(const char* fname, int flags, int mode, uint64_t mapsizeMB);