Team-Silver-Sphere / Squad-Community-Ban-List

Protecting the Squad community's integrity through collaboration and information sharing.
MIT License
18 stars 12 forks source link

Ban Generator Optimisation #7

Closed Thomas-Smyth closed 4 years ago

Thomas-Smyth commented 4 years ago

Currently, when the ban generator generates a new ban list it queries the database n times, where n is equal to the number of unique SteamIDs in the bans we import. This is already fairly slow and as the database of bans grows in size it will only get slower.

I think this process could be optimised by querying for all bans at once and processing them all together as opposed to querying for all players and then querying for all bans from each player. This will mean the updater and generator will need to be split as the logic will no longer be able to work together.