mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
While a user is connecting to an IRC server, the CUser instance didn't know about the CIRCSock instance (due to historic reasons). This meant that we needed to use FindSockByName() when we had to check if there is any CIRCSock associated with this user. However, this is a bad idea since FindSockByName() is O(n) on the number of sockets that the socket manager is managing. Instead, we now already set CUser::m_pIRCSock when the CIRCSock is created so that checking for an irc socket becomes O(1). This was inspired by the results of profiling a znc instance with 900 users. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2171 726aef4b-f618-498e-8847-2d620e286838
38 KiB
38 KiB