Use JFace Throttler in AnimationManager #3902
Merged
vogella merged 1 commit intoeclipse-platform:masterfrom Apr 20, 2026
Merged
Use JFace Throttler in AnimationManager #3902vogella merged 1 commit intoeclipse-platform:masterfrom
vogella merged 1 commit intoeclipse-platform:masterfrom
Conversation
b2d5d54 to
45c036c
Compare
Contributor
1835b99 to
b4ec2b7
Compare
The AnimationManager used a system WorkbenchJob ("Animation start")
to toggle the progress region animation on/off with a 100ms debounce.
Each job start/stop rescheduled this system job, producing constant
"Animation start" noise in the Progress View when system jobs are
shown and adding unnecessary Job-scheduler traffic.
The job never ran any work off the UI thread. Its runInUIThread
method toggled the animation and immediately returned OK_STATUS, so
the Job scheduling machinery (queue, worker thread, rule checking,
listener notifications, status objects) was pure overhead around a
one-line UI update.
Replace it with Display.asyncExec + Display.timerExec(100ms,
runnable). Calling timerExec with the same Runnable reschedules the
pending timer, matching the original Job.schedule(100) coalescing
behavior on a sleeping job: bursts collapse into one UI update, and
jobs that finish within the debounce window do not visibly flash the
animation. An AtomicBoolean guards against posting redundant
asyncExecs while one is already in flight.
JFace Throttler was considered but its leading-edge semantics run the
first call after a quiet period immediately, which would let
sub-100ms cold-start jobs flash the animation. The Display.timerExec
approach preserves the original always-defer behavior.
Apply the same change to the parallel e4 AnimationManager and remove
the now-unused AnimationManager_AnimationStart message key from the
e4 bundle.
TaskBarProgressManager uses a similar WorkbenchJob but
self-reschedules every 400ms to poll progress, so it is intentionally
left unchanged.
b4ec2b7 to
d692cf9
Compare
vogella
added a commit
to vogella/eclipse.platform.ui
that referenced
this pull request
Apr 20, 2026
Reduce @RepeatedTest from 500 to 200 to avoid hitting the macOS surefire 1200s test-bundle timeout. This branch now also carries the 'Extract pure matching helpers from QuickAccessMatcher' refactor (cherry-picked from refactor/quickaccess-pure-matching) so the instrumented run exercises the same code path as the original PR eclipse-platform#3902 CI failure. If 200 iterations show failures here that the prior non-refactored run did not, that pins the regression on the refactor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AnimationManager used a system WorkbenchJob ("Animation start") to toggle the progress region animation on/off with a 100ms debounce. Each job start/stop rescheduled this system job, producing constant "Animation start" noise in the Progress View when system jobs are shown and adding unnecessary Job-scheduler traffic.
The job never ran any work off the UI thread -- runInUIThread toggled the animation and immediately returned OK_STATUS. The Job scheduling machinery (queue, worker thread, rule checking, listener notifications, status objects) was pure overhead around a one-line UI update.
Replace the update job with org.eclipse.jface.util.Throttler, which runs on the UI thread via Display.timerExec with the same 100ms debounce semantics and no Job. This also aligns the animation manager with the rest of the progress package (ProgressManager, ProgressViewUpdater, ProgressAnimationItem), which already uses Throttler for the same "coalesce bursty UI updates" pattern.
Apply the same change to the parallel e4 AnimationManager and remove the now-unused AnimationManager_AnimationStart message key from the e4 bundle.
TaskBarProgressManager uses a similar WorkbenchJob but self-reschedules every 400ms to poll progress, so it is intentionally left unchanged.