It sounds like a very sensitive area where even subtle changes in
behavior (timing of events) are likely to be disruptive
downstream...
What will be the net benefit from such a change from an end-user
point of view as well as from and downstream developer point of
view? I.e., will something be faster or more flexible? Will the
platform be easier/cheaper to maintain?
Primarily the focus of removing the Activators are to do with minimising startup time and to enable parallelisation of startup. Currently we’re pretty single-threaded at startup and some of the key blockers are the Acivators.
We’ve been working on removing these and getting them out of the critical path for startup over the past few releases. The key reason I’m focusing on Activators is that whenever any resource is accessed (even loading an image from a bundle) that bundle is activated, which incurs the cost of not only executing the Activator but also loading all transient classes required by that Activator (including potentially triggering nested Activators).
The net result is that we’re effectively single-threaded on most of our startup code and loading classes ‘just in case’ before they’re strictly needed. In the case of the Workspace, downstream plugins are (generally) calling workspace.addResourceChangeListener() to listen for future events right at startup, which isn’t the kind of thing that needs to be done while the splash screen is being shown … Simplification is good, but performance is a more worthy goal. Unfortunately there’s a lot of hard-coded references to ResourcesPlugin that are likely to be affected which we need to resolve.
The whole goal of this is performance related; Lars has been tracking some of the results here:
The challenge is trying to reduce the amount of work done during startup, and have resources/classes lazily loaded when needed. The below shows that org.eclipse.core.resources is taking up over 10% of the launch time, when in reality, the startup work could be done in a separate thread:
|