On Sat, May 25, 2019 at 07:37:07PM +0200, Claudio Jeker wrote:
> getpeerbyid() is currently walking the peer list to find the right one.
> This is rather inefficent once you have more then a handful of peers.
> Switch it to a RB tree and save a lot of time:
> 

OK denis@

> Before:
>   %   cumulative   self              self     total
>  time   seconds   seconds    calls  ms/call  ms/call  name
>  22.0     148.60   148.60 18197532     0.01     0.01  session_update [5]
> After:
>   1.6     515.14     9.13 16887495     0.00     0.00  session_update [11]
> 
> Saves around 140sec or 20% of run time.
> -- 
> :wq Claudio
> 

Reply via email to