Commit 9d551a5
committed
Debounce Quick Access keystrokes before computing proposals
Every keystroke scheduled the background compute job immediately and
cancelled the in-flight one, so fast typing triggered a compute per
character even though only the final filter matters.
Collapse a burst of keystrokes into a single computation: the modify
listener now schedules the compute job with a 100 ms delay, and each new
keystroke cancels the still-sleeping job from the previous one, so only
the last keystroke in the window actually computes. The other callers
(initial open, show-all toggle, resize) keep zero delay.
The job is scheduled for the whole delay, so it stays visible to
COMPUTE_JOB_FAMILY and tests that join that family still observe the
pending compute.1 parent 74e6073 commit 9d551a5
1 file changed
Lines changed: 21 additions & 3 deletions
File tree
- bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/quickaccess
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
168 | 183 | | |
169 | 184 | | |
170 | 185 | | |
| |||
264 | 279 | | |
265 | 280 | | |
266 | 281 | | |
267 | | - | |
268 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
269 | 286 | | |
270 | 287 | | |
271 | 288 | | |
| |||
741 | 758 | | |
742 | 759 | | |
743 | 760 | | |
744 | | - | |
| 761 | + | |
| 762 | + | |
745 | 763 | | |
746 | 764 | | |
747 | 765 | | |
| |||
0 commit comments