summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-05-05 10:00:45 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-05-05 10:00:45 +0100
commitb7346649926b4357b27aa81238eb34cebe39671b (patch)
tree9855293065d4c5af8bfcb0fc7a7f7cd778ea5d19
parentaf422b45c7fb406dae35dc3f811e50d92e854f58 (diff)
downloadwebstat-b7346649926b4357b27aa81238eb34cebe39671b.tar.bz2
webstat-b7346649926b4357b27aa81238eb34cebe39671b.tar.xz
webstat-b7346649926b4357b27aa81238eb34cebe39671b.zip
Switch to std::map for existingEntities cache
Insertion cost of flat_map too high when map grows large.
-rw-r--r--src/ingestor.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ingestor.hpp b/src/ingestor.hpp
index 81041ff..dd803ce 100644
--- a/src/ingestor.hpp
+++ b/src/ingestor.hpp
@@ -8,8 +8,8 @@
#include <connection_fwd.h>
#include <cstdio>
#include <expected>
-#include <flat_map>
#include <future>
+#include <map>
#include <scn/scan.h>
#include <span>
#include <sys/utsname.h>
@@ -97,7 +97,7 @@ namespace WebStat {
DB::ConnectionPoolPtr dbpool;
mutable Stats stats {};
- std::flat_map<EntityHash, EntityId> existingEntities;
+ std::map<EntityHash, EntityId> existingEntities;
LineBatch queuedLines, processingLines;
bool terminated = false;