Performance improvement when collecting counts for categories. Instead of making n calls for each category to sql, we get a grouped count by shipID, then process this in python, which is much faster.

This commit is contained in:
Ryan Holmes
2019-03-14 14:15:01 -04:00
parent 82c5ae1fe9
commit 8e98af8517
4 changed files with 16 additions and 3 deletions

View File

@@ -146,6 +146,11 @@ class Fit(FitDeprecated):
pyfalog.debug("Getting count of all fits.")
return eos.db.countAllFits()
@staticmethod
def countAllFitsGroupedByShip():
count = eos.db.countFitGroupedByShip()
return count
@staticmethod
def countFitsWithShip(stuff):
pyfalog.debug("Getting count of all fits for: {0}", stuff)