[Bug]: Duplicate Workbench Slowness with Large Number of Sets #59
Labels
No labels
Kind/Bug
Kind/Feature
Priority/High
Priority/Medium
Reviewed/Confirmed
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-collab/bulk-image-organizer#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
App version
0.1.22
Platform
Windows
Steps to reproduce
Expected behavior
Near instant response when interacting with the application.
Actual behavior
4 second delay between interaction and application response
Additional context
I'm seeing a CPU core spike in use while the operation is delayed
The core issue seems to be around large tag counts slowing the application. Include review of, and optimization for, high tag counts.
Implemented performance fix on branch
0.1.24/issue-59-dupe-workbench-perf.Root cause: The Duplicates workbench rebuilt the entire tag list (400+ buttons) on every interaction, running 2+ DB queries per tag (
get_image_dicts_for_dupe_tag,count_images_for_dupe_tag). Navigation between groups and tag apply/delete also triggered full rebuilds and, in some paths, reloaded tags for all 3000+ images.Fix:
WorkingDB.get_dupe_tag_summaries()— batch member/delete counts and filter visibility in 1–2 queriesrefresh_statuses_from_db()— update counts/indicators without destroying widgetsrefresh_dupe_list=False)_reload_all_model_tags()after Keep Best_enrich_dupe_group_images()uses one tag-color map instead of per-image DB lookupscount_distinct_dupe_tags()usesCOUNTinstead of fetching all namesTests added for summaries and status derivation. Awaiting manual verification on a large duplicate set before closing.
Follow-up fix on
0.1.24/issue-59-dupe-workbench-perffor the remaining delay when leaving Single viewer back to Multi view.Cause:
_restore_from_viewer_sub()used the generic exit path, which invalidated the 3000-row filter proxy, reloaded the tag panel, and fully rebuilt the duplicate tag list — even though the Multi comparison grid was already populated.Fix:
_exit_viewer_to_dupes_multi()fast path: keeps the grid, runsrefresh_statuses_from_db()+sync_image_tags()only_on_dupe_multi_requested()call after viewer double-click returnTest added:
test_dupe_viewer_exit_skips_full_dupe_list_rebuild.Verified fixed. Closed via PR #65 (
0.1.24/issue-59-dupe-workbench-perf→main, release 0.1.25).Delivered:
get_dupe_tag_summaries()replaces per-tag DB round-trips in the duplicate sidebarManual verification confirmed near-instant response across navigation, tagging, viewer, and Multi return with 400+ duplicate sets.