Skip to content

Speed up GUI object filtering (debounce + incremental row updates)#92

Merged
jhrutgers merged 1 commit intoDEMCON:mainfrom
phectori:gui-optimize-filter
Mar 27, 2026
Merged

Speed up GUI object filtering (debounce + incremental row updates)#92
jhrutgers merged 1 commit intoDEMCON:mainfrom
phectori:gui-optimize-filter

Conversation

@phectori
Copy link
Copy Markdown

@phectori phectori commented Jan 8, 2026

Summary

Filtering in the Tk GUI felt slow with many objects because each keystroke triggered a full re-filter that re-gridded and re-styled every row. This change improves filtering speed by debouncing the filter and by updating only the rows whose visibility/position/style actually changed.

It seemed only slow in the windows application.

Changes

  • Debounce regex filtering in the filter entry so it does not run a full filter run on every keypress.
  • Optimize the filtering/layout path to avoid redundant Tk operations:
    • Only hide rows that became invisible
    • Only show/move rows whose grid row changed
    • Only re-apply alternating row styles when changed
    • Early-exit when the filtered result is unchanged

@phectori phectori requested a review from jhrutgers January 8, 2026 12:03
@phectori phectori self-assigned this Jan 8, 2026
@jhrutgers jhrutgers merged commit d7d7692 into DEMCON:main Mar 27, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants