mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use unordered_map to store sessions for performance reasons
This commit is contained in:
parent
2a717e05cc
commit
e2dc6df8a2
4 changed files with 36 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <sys/types.h> // for u_char
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "zeek/Frag.h"
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
using SessionMap = std::map<detail::Key, Session*>;
|
||||
using SessionMap = std::unordered_map<detail::Key, Session*, detail::KeyHash>;
|
||||
|
||||
// Inserts a new connection into the sessions map. If a connection with
|
||||
// the same key already exists in the map, it will be overwritten by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue