Commit cb6fb46
committed
PICARD-3281: Throttle background task callback processing
Background task callbacks (ProxyToMainEvent) were processed immediately
in Tagger.event(), causing bursts of hundreds of callbacks to execute
back-to-back without yielding to the event loop. This blocked UI
repaints and input handling.
Queue incoming callbacks and process them in batches of 25, using
QTimer.singleShot(0) between batches to yield to the event loop.
This ensures the UI remains responsive even during heavy background
task completion (e.g. file loading with 2000+ files).1 parent 3743484 commit cb6fb46
1 file changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
825 | 829 | | |
826 | 830 | | |
827 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
828 | 835 | | |
829 | 836 | | |
830 | 837 | | |
| |||
836 | 843 | | |
837 | 844 | | |
838 | 845 | | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
839 | 856 | | |
840 | 857 | | |
841 | 858 | | |
| |||
984 | 1001 | | |
985 | 1002 | | |
986 | 1003 | | |
987 | | - | |
| 1004 | + | |
988 | 1005 | | |
989 | 1006 | | |
990 | 1007 | | |
| |||
0 commit comments