Bug 61988 - [Activities] Performance of WorkbenchActivitySupport.setEnabledActivityIds
Summary: [Activities] Performance of WorkbenchActivitySupport.setEnabledActivityIds
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2004-05-12 15:40 EDT by John Arthorne CLA
Modified: 2004-07-06 09:32 EDT (History)
1 user (show)

See Also:


Attachments
Profiler output (105.35 KB, text/plain)
2004-05-12 15:40 EDT, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2004-05-12 15:40:01 EDT
I20040512 - 0800

Steps:

1) Launch a runtime workbench from a self hosting workspace in debug mode
2) After the workbench has started, suspend all threads
3) Expand the main thread, and select it in the Debug view
4) Hold down "Down arrow" to scroll down the stack frames.

This is extremely slow.  When profiling, I noticed a third of the time is taken
by WorkenchActivitySupport.setEnabledIds (see attached profiler output).  In
actual fact, the set of enabled activities *never* changes in this scenario.
Each call to MutableActivityManager.setEnabledActivityIds is providing the exact
same set of activities. It actually detects this case, but then proceeds to call
updateIdentifiers, which does some expensive pattern matching computations
(725,000 invocations of Pattern$Dot.match, for example).
Comment 1 John Arthorne CLA 2004-05-12 15:40:29 EDT
Created attachment 10564 [details]
Profiler output
Comment 2 Darin Swanson CLA 2004-05-12 15:54:50 EDT
This is the same performance problem we are seeing in bug 61829
Comment 3 Kim Horne CLA 2004-05-12 17:32:25 EDT
Oi.  That's terrible.
Comment 4 Kim Horne CLA 2004-05-13 08:00:59 EDT
Fix in HEAD.  Identifiers are only updated in the event that the enabled set has
changed.
Comment 5 Darin Swanson CLA 2004-05-13 08:48:38 EDT
Kim can you indicate which plugins from HEAD I would need to check if this 
fixes bug 61829...or if you can indicate that it is a dup? 
Thanks either way :-)
Comment 6 Kim Horne CLA 2004-05-13 08:54:09 EDT
I don't believe this is a dupe, although it MIGHT be.  The bug you referenced
shows a context/command problem, not necessarily an activity problem.  The
systems have some interaction but I'm not sure this would be a problem for you.
 You can check out org.eclipse.ui.workbench to test against...
Comment 7 Kim Horne CLA 2004-05-13 08:58:58 EDT
I've just taken a quick look myself and it's still rather slow but I don't have
a frame of reference to judge against... I had never tried it before this fix.
Comment 8 John Arthorne CLA 2004-05-13 14:19:56 EDT
Previously this accounted for about 35% of stepping time. I will try again with
tonight's nightly build and get some new profiler output. There are still a
number of other things happening while stepping that are causing slowness (see
bug b1992)
Comment 9 Kim Horne CLA 2004-05-19 08:35:32 EDT
Verified in 200405190010
Comment 10 Kim Horne CLA 2004-07-06 09:32:03 EDT
Closing to keep a tidy house.  Pardon the spam.