Project: Eclipse_Platform_UI
Bug 61988 [Activities] Performance of WorkbenchActivitySupport.setEnabledActivityIds
Reported: 2004-05-12 15:40:01 | Status: closed fixed

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).

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java