Compute toc only if needed

This commit is contained in:
Andrea Lanfranchi 2024-02-22 14:32:16 +01:00
parent 411df327bf
commit 7b0500a17d
No known key found for this signature in database
GPG Key ID: 2D623A60BB279915

View File

@ -172,8 +172,8 @@ def find(
# Should we have no representations bailout
if len(representations) == 0:
toc = time.time()
if not silent:
toc = time.time()
logger.info(f"find function duration {toc - tic} seconds")
return []
@ -266,9 +266,8 @@ def find(
# -----------------------------------
toc = time.time()
if not silent:
toc = time.time()
logger.info(f"find function duration {toc - tic} seconds")
return resp_obj