v0.9.18
This commit is contained in:
@@ -712,7 +712,7 @@ class DuplicateDetector(QThread):
|
||||
progress = int((processed_initial / total_files) * total_files)
|
||||
self.progress_update.emit(
|
||||
progress, total_files * 2,
|
||||
UITexts.DUPLICATE_MSG_HASHING.format(filename=os.path.basename(path)))
|
||||
UITexts.DUPLICATE_MSG_HASHING.format(filename="..."))
|
||||
last_update_time = time.perf_counter()
|
||||
|
||||
except OSError:
|
||||
@@ -771,9 +771,11 @@ class DuplicateDetector(QThread):
|
||||
break
|
||||
|
||||
# Sub-phase: Indexing hashes into the BK-Tree for comparison
|
||||
if time.perf_counter() - last_update_time > 0.05 or i == 0 or i == total_items - 1:
|
||||
if time.perf_counter() - last_update_time > 0.05 \
|
||||
or i == 0 or i == total_items - 1:
|
||||
# Scale Indexing to 50% - 75% range of the total bar
|
||||
indexing_progress = int((i / total_items) * (total_files / 2)) if total_items > 0 else 0
|
||||
indexing_progress = int((i / total_items) * (total_files / 2)) \
|
||||
if total_items > 0 else 0
|
||||
self.progress_update.emit(
|
||||
total_files + indexing_progress, total_files * 2,
|
||||
UITexts.DUPLICATE_MSG_ANALYZING.format(filename="..."))
|
||||
@@ -814,7 +816,8 @@ class DuplicateDetector(QThread):
|
||||
items1 = hash_map[h1]
|
||||
|
||||
# Update progress more frequently during analysis phase
|
||||
if time.perf_counter() - last_update_time > 0.05 or i == 0 or i == total_queries - 1:
|
||||
if time.perf_counter() - last_update_time > 0.05 \
|
||||
or i == 0 or i == total_queries - 1:
|
||||
# Scale Comparison to 75% - 100% range
|
||||
comparison_progress = int(((i + 1) / total_queries) * (total_files / 2)) \
|
||||
if total_queries > 0 else (total_files / 2)
|
||||
@@ -853,10 +856,10 @@ class DuplicateDetector(QThread):
|
||||
|
||||
# Frequent UI heartbeat for large duplicate groups
|
||||
if time.perf_counter() - last_update_time > 0.05:
|
||||
phase2_progress = int(((i + 1) / total_queries) * total_files)
|
||||
comparison_progress = int(((i + 1) / total_queries) * (total_files / 2))
|
||||
self.progress_update.emit(
|
||||
total_files + phase2_progress, total_files * 2,
|
||||
UITexts.DUPLICATE_MSG_ANALYZING.format(filename=os.path.basename(p1)))
|
||||
int(total_files * 1.5 + comparison_progress), total_files * 2,
|
||||
UITexts.DUPLICATE_MSG_ANALYZING.format(filename="..."))
|
||||
last_update_time = time.perf_counter()
|
||||
|
||||
# Collect for batch update to improve performance
|
||||
|
||||
Reference in New Issue
Block a user