mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-23 05:56:26 +08:00
GUI: add treedata debug log
This commit is contained in:
parent
7cd17b9ff6
commit
4b1104e65a
1 changed files with 3 additions and 2 deletions
|
@ -216,10 +216,11 @@ def _make_treedata_from_json(ls_result: List[dict]) -> sg.TreeData:
|
|||
)
|
||||
# Since the thread is heavily CPU bound, let's add a minimal
|
||||
# arbitrary sleep time to let GUI update
|
||||
# In a 130k entry scenario, this added less than a second on a 25 second run
|
||||
# In a 130k entry scenario, using count % 1000 added less than a second on a 25 second run
|
||||
count += 1
|
||||
if not count % 1000:
|
||||
if not count % 2000:
|
||||
sleep(0.0001)
|
||||
logger.debug(f"Processed {count} entries")
|
||||
return treedata
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue