Closed dequis closed 6 years ago
(eion says that he has hash tables for everything in )
@EionRobb uses hash tables for storing users in purple-discord
@dequis forgot to finish that sentence before pressing submit and apologizes
This actually breaks most of get_user(..., SEARCH_ID) calls because this PR doesn't convert id's to guint64 in those. This breakage is likely to be the main source of speedup seen and the impact is likely to be less if done right. As agreed with @dequis on irc closing this one for now, will likely convert bitlbee-discord to use hash-tables later which should be a decent improvement and will probably include this id typechange as well.
Second to last of today's optimizations, also probably not as meaningful as linked list tweaks in bitlbee, but it brought a guild sync of 50k members from 162 to 13 seconds (inside callgrind, which slows everything down. I don't know the time for that guild inside callgrind without any optimizations, probably 10 or 20 minutes)
Callgraph that motivated this change follows.
cmp_user_id
and its correspondingg_slist_find_custom
both pretty much vanish after applying this. I expected needing to get rid of linked lists in here too, but it doesn't look like it will be necessary (eion says that he has hash tables for everything in )