Skip to content

Use JFace Throttler in AnimationManager #3902

Merged
vogella merged 1 commit intoeclipse-platform:masterfrom
vogella:fix/animation-manager-throttler
Apr 20, 2026
Merged

Use JFace Throttler in AnimationManager #3902
vogella merged 1 commit intoeclipse-platform:masterfrom
vogella:fix/animation-manager-throttler

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 18, 2026

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.

@vogella vogella force-pushed the fix/animation-manager-throttler branch from b2d5d54 to 45c036c Compare April 18, 2026 19:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

Test Results

   852 files  ±0     852 suites  ±0   58m 29s ⏱️ + 4m 9s
 7 899 tests ±0   7 656 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 199 runs  ±0  19 544 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit d692cf9. ± Comparison against base commit 9b991c8.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the fix/animation-manager-throttler branch 3 times, most recently from 1835b99 to b4ec2b7 Compare April 19, 2026 06:14
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.
@vogella vogella force-pushed the fix/animation-manager-throttler branch from b4ec2b7 to d692cf9 Compare April 20, 2026 08:51
@vogella vogella merged commit af78fcf into eclipse-platform:master Apr 20, 2026
25 of 26 checks passed
@vogella vogella deleted the fix/animation-manager-throttler branch April 20, 2026 13:30
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.
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.

1 participant