|
10 | 10 | #include <ranges>
|
11 | 11 | #include <string>
|
12 | 12 | #include <string_view>
|
13 |
| -#include <unordered_map> |
14 |
| -#include <unordered_set> |
15 | 13 | #include <utility>
|
16 | 14 | #include <vector>
|
17 | 15 |
|
@@ -65,9 +63,9 @@ static EventSchema parseEventSchema(
|
65 | 63 | // Schemas are globally loaded.
|
66 | 64 | // This static/thread_local dance is to make it appropriately thread safe but
|
67 | 65 | // still fast.
|
68 |
| -static std::unordered_set<EventSchema, EventIdHash, EventIdEq> MasterSchemas; |
| 66 | +static absl::flat_hash_set<EventSchema, EventIdHash, EventIdEq> MasterSchemas; |
69 | 67 | static std::mutex MasterSchemaMutex;
|
70 |
| -thread_local std::unordered_set<EventSchema, EventIdHash, EventIdEq> Schemas; |
| 68 | +thread_local absl::flat_hash_set<EventSchema, EventIdHash, EventIdEq> Schemas; |
71 | 69 |
|
72 | 70 | static void updateSchemaStructures(EventId Id, EventSchema schema) {
|
73 | 71 | std::scoped_lock Lock(MasterSchemaMutex);
|
@@ -167,7 +165,7 @@ static const std::boyer_moore_horspool_searcher
|
167 | 165 | EventTagSearcher(EventTag.begin(), EventTag.end());
|
168 | 166 |
|
169 | 167 | static BlockEventMap parseEvents(const std::string_view BlockLog) {
|
170 |
| - std::unordered_map<EventId, std::vector<Event>, EventIdHash, EventIdEq> |
| 168 | + absl::flat_hash_map<EventId, std::vector<Event>, EventIdHash, EventIdEq> |
171 | 169 | Result;
|
172 | 170 |
|
173 | 171 | const auto E = BlockLog.end();
|
@@ -205,7 +203,9 @@ static Block parseBlock(ev::Benchmark *Bench, const std::string_view BlockLog) {
|
205 | 203 | .RawLog = BlockLog,
|
206 | 204 | .UniqueId = std::move(UniqueId),
|
207 | 205 | .Bench = Bench,
|
208 |
| - .File = "", // TODO: Get this information too |
| 206 | + // Extracting file info costs quite a bit of time, and we never use it |
| 207 | + // anyway. |
| 208 | + .File = "", |
209 | 209 | };
|
210 | 210 | }
|
211 | 211 |
|
|
0 commit comments