Bug 389221 - ToolItemUpdateTimer puts constant load on CPU
Summary: ToolItemUpdateTimer puts constant load on CPU
Status: CLOSED DUPLICATE of bug 385394
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 03:57 EDT by Dani Megert CLA
Modified: 2012-10-02 15:58 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2012-09-11 03:57:19 EDT
4.2.

The ToolItemUpdateTimer checks enablement and updates the items every 400 ms. It doesn't seem right that we constantly update stuff without any changes being reported.

Also, the number of items to updated increases with each open workbench window.


Depending on what the task does, this *might* (did not verify this) also cause temporary objects on the heap and cause more GCs than needed.
Comment 1 Dani Megert CLA 2012-09-11 03:57:37 EDT
There's no such timer in 3.8.
Comment 2 rgra Missing name CLA 2012-10-02 08:10:32 EDT
For Reference this is the line from:
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem

// HACK!! local 'static' timerExec...should move out of this class post 4.1
public static ToolItemUpdateTimer toolItemUpdater = new ToolItemUpdateTimer();

I tried to debug the dependency injection process to find another problem and this timer put's heavy load on the DI container too (org.eclipse.e4.core.internal.di.InjectorImpl.resolveArgs).
Comment 3 Eric Moffatt CLA 2012-10-02 14:02:11 EDT
We are aware of this and are looking into various ways to 'fix' it. It's a *real* problem on Linux SUSE systems since the timer events cross the client / server boundary.

There's another defect about this somewhere according to Paul...I'll let him comment.
Comment 4 Paul Webster CLA 2012-10-02 15:58:26 EDT

*** This bug has been marked as a duplicate of bug 385394 ***