mirror of
https://github.com/serengil/deepface.git
synced 2025-06-10 21:37:09 +00:00
Compute toc only if needed
This commit is contained in:
parent
411df327bf
commit
7b0500a17d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user