improving Snap suggestions read time

This commit is contained in:
Vinicius Moreira
2019-09-17 15:10:54 -03:00
parent 6cd682b92e
commit 80f49bd083
5 changed files with 44 additions and 20 deletions

View File

@@ -281,7 +281,10 @@ class GenericSoftwareManager(SoftwareManager):
def _fill_suggestions(self, suggestions: list, man: SoftwareManager, limit: int):
if self._can_work(man):
mti = time.time()
man_sugs = man.list_suggestions(limit)
mtf = time.time()
self.logger.info(man.__class__.__name__ + ' took {0:.2f} seconds'.format(mtf - mti))
if man_sugs:
if len(man_sugs) > limit: