aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Glen Miner2024-12-17 12:44:14 -0500
committerGravatar Sadie Powell2024-12-19 14:10:08 +0000
commit41293a058de93114cc42982359bdc99bef68ed59 (patch)
tree87a604d838fd02b33fc9d03e26ff82232c4f8669 /include
parentAllow explicitly disabling the ojoin/operprefix prefix characters. (diff)
Optimized membership lookup for large servers
On our server hosting 150K users we noticed that std::map lookups for user membership were high on the profile. Since there seemed to be no ordered iteration needed we were able to shave a few % off of the profile by changing this to a std::unordered_map
Diffstat (limited to 'include')
-rw-r--r--include/channels.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/channels.h b/include/channels.h
index 8d8355257..cb102be34 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -43,7 +43,7 @@ class CoreExport Channel final
public:
/** A map of Memberships on a channel keyed by User pointers
*/
- typedef std::map<User*, insp::aligned_storage<Membership>> MemberMap;
+ typedef std::unordered_map<User*, insp::aligned_storage<Membership>> MemberMap;
private:
/** Set default modes for the channel on creation