| Summary: | The timerExec for the menuBar creates more GC'able objects | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Paul Webster <pwebster> | ||||||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | dj.houghton, emoffatt, Mike_Wilson, remy.suen | ||||||||
| Version: | 4.1 | Flags: | remy.suen:
review+
|
||||||||
| Target Milestone: | 4.1.1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Paul Webster
Created attachment 197993 [details]
Reduce object creation during timer v01
This patch removes as much context creation as possible from the timerExec menu bar visibility call.
There's only one static context, and it is cleared and re-used every time.
It slows down the rate of heap growth, but it's still >1M/sec.
PW
Created attachment 198025 [details]
Updating the action bars instead v01
This approach gets rid of the dependence on the timer, and tries to take advantage of the part activation change events to update the menus.
Much better on the GC side, but some changes to the system happen the updateActionBars(), so in the XSD editor case the Refactor menu doesn't show up unless you switch to the Package Explorer and back while the XSD is the active editor.
PW
Created attachment 198081 [details]
Use RAT to track changes v01
This approach creates a RAT that accesses the variables that need tracking, so it will be re-run if they change.
It then posts an asyncExec(*) to actually evaluate the top level menu, and makes sure there is only one in the system at a time.
The system is responsive. And when you're not doing something, the heap status shows a slow climb, <1M per 2 secs.
PW
(In reply to comment #3) > Created attachment 198081 [details] > Use RAT to track changes v01 Remy, could you please review this change? PW (In reply to comment #4) > (In reply to comment #3) > > Created attachment 198081 [details] [details] > > Use RAT to track changes v01 > > > Remy, could you please review this change? Makes sense to me. Released to HEAD PW (In reply to comment #6) > Released to HEAD I don't think WorkbenchWindow.java was released. I've committed it to HEAD. Paul, please confirm. |