Closed Tschis closed 5 years ago
Bot searches all entries to get first 100/200 visible entries for the user that executed the command.
Every entry would then execute a call into get_member, and this would take some time, which in turn could make the bot timeout while waiting.
get_member
By introducing the cache, the same members will not be searched repeatedly and the performance is increased a lot.
PR modified to also add caching to /levels and /timeline, which suffered from the same bottleneck.
/levels
/timeline
Just wanted to add that, other than those minor details, this is a very good solution.
Perfect, thanks!
Bot searches all entries to get first 100/200 visible entries for the user that executed the command.
Every entry would then execute a call into
get_member
, and this would take some time, which in turn could make the bot timeout while waiting.By introducing the cache, the same members will not be searched repeatedly and the performance is increased a lot.