Calculating affinity takes really long when there are many users or really big lists.
Opened this issue · 0 comments
AlexanderColen commented
Two potential bottlenecks, most likely a combination of the two in the end.
Iterating over the lists multiple times, can probably be done more simply.
Annie-May-Discord-Bot/Annie/Utility/AffinityUtility.cs
Lines 31 to 40 in a22aada
4 GraphQL queries per user really hurts performance the more users are in the server. Quick fix is to move the original user out of this method, which already cuts it down to half.
Annie-May-Discord-Bot/Annie/Modules/AffinityModule.cs
Lines 46 to 49 in a22aada