Bug 197036 - [api][breaking][performance] All Filter Pools created on Clean Workspace
Summary: [api][breaking][performance] All Filter Pools created on Clean Workspace
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: David Dykstal CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api, performance
Depends on:
Blocks: 181939 220524
  Show dependency tree
 
Reported: 2007-07-18 17:07 EDT by Kevin Doyle CLA
Modified: 2008-08-05 10:37 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (738 bytes, application/octet-stream)
2008-02-01 11:01 EST, David Dykstal CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-07-18 17:07:27 EDT
When loading the RSE Perspective for the first time all the default filter pools are created even though I only have a local connection.

We should only be creating the filter pools related to Local when RSE loads for the first time, as creating them all for both Team and default profile slows down the loading of RSE.  Also causes saving of profiles to take longer as it has filter pools that may never be used.

-----------Enter bugs above this line-----------
TM 2.0 Testing
installation : eclipse-SDK-3.3
RSE install  : RSE 2.0
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-07-19 05:14:48 EDT
I fully agree: creation of filter pools should not be done if the pool is not referenced by any host. Fixing this could be a first important step towards reducing RSE startup time as requested by bug #181939.

I'd like to see this adressed with high priority since performance and avoiding unnecessary plugin loading are very important points.
Comment 2 Martin Oberhuber CLA 2007-09-10 08:50:21 EDT
Will look at this for 3.0, there might be ways achieving this even without API change for 2.0.2
Comment 3 David Dykstal CLA 2008-01-02 16:15:20 EST
Each time a profile is created all subsystem configurations are asked to create their default filter pools. A default filter pool could be created as connections come into existence in that profile. The list of subsystem configurations for that connection could be requested to create their default filter pools in the connection’s profile if they have not already done so.

However, a connection in one profile is allowed to reference a filter pool from another profile. Filter pools typically have to exist prior to being referenced. It would no longer be as easy to modify a newly created connection to reference a default filter pool in another profile. One has to take the extra step of creating a similar connection in the target profile in order to force the creation of the desired pools. However, the chance of a user actually wanting to reference *default* pools across profiles should be quite small so this behavioral change is probably acceptable.

We could mitigate this by having a new “create default pools” for a profile/subsystem configuration, but that seems like overkill to me.
Comment 4 David Dykstal CLA 2008-02-01 11:01:52 EST
Created attachment 88573 [details]
mylyn/context/zip
Comment 5 David Dykstal CLA 2008-02-02 09:42:28 EST
There will be minor API changes. Testing the solution completely involves getting subsystem configuration switch to work correctly and reliably for service subsystems so these were refactored as well to eliminate copies of the code. Subsystem configuration switching will eventually be turned off at the UI but I would like it to be left at the API level since it provides an excellent means of testing late loading of subsystem configurations (see bug 181939). Tests will be added to make sure switching is working correctly.

In particular it seems to make sense to merge IServiceSubSystemConfiguration with ISubSystemConfiguration and IServiceSubsystem with ISubSystem at some point in the near future. This means that all subsystems would be capable of having a service layer if they want. It becomes a runtime issue, not a compile time typing issue. It simplifies the code quite a bit and provides a cleaner API - see bug 217556.
Comment 6 David Dykstal CLA 2008-02-05 14:32:09 EST
Fixed.

Filter pools are now created only when first accessed or when created on import/restore.

Subsystem configurations are loaded only when required - on import/restore from the persistent form or when created using the wizard or API. The wizard currently queries more than necessary. This will be addressed by another item - bug 217894.

Subsystem switching was improved since this was used to test filter pool creation. There was some refactoring here and more that could be done. See bug 217556.
Comment 7 Martin Oberhuber CLA 2008-02-05 15:53:31 EST
Can you give a list of API changes you made for this work?
Comment 8 David Dykstal CLA 2008-02-05 22:10:10 EST
This is the list of API changes.

org.eclipse.rse.core.model.ISystemProfile
createHost(IRSESystemType, String, String, String) was removed. Users should use the create methods in the system registry.

org.eclipse.rse.core.model.ISystemProfileManager
added commitSystemProfile(ISystemProfile) to the interface

org.eclipse.rse.core.model.ISystemRegistry
createHost(String, IRSESystemType, String, String, String, boolean) was added to all the creation of hosts without causing subsystems to be created.
getSubSystemConfigurationsBySystemType(IRSESystemType, boolean, boolean) was added to suppress the activation of subsystem configurations that have not yet been loaded.
getSubSystemConfigurationsBySystemType(IRSESystemType, boolean) the specification was clarified to indicate that subsystem configuration loading will be suppressed. Subsystem configurations that are returned will only be those that have had system configurations loaded.
getSubSystems(IHost, boolean) was deprecated. The force parameter no longer applies.
getSubSystems(IHost) the specfication was changed. This should no longer force the loading of subsystem configurations. All subsystem configurations that have been persisted would be restored on startup so the force parameter was redundant.

org.eclipse.rse.core.subsystems.IServiceSubSystem
canSwitchTo(IServiceSubsystemConfiguration) was added

org.eclipse.rse.core.subsystems.ISubSystemConfiguration
getFilterPoolManager(ISystemProfile) specification was changed to not force the creation of default filter pool
getFilterPoolManager(ISystemProfile, boolean) was added to allow the creation of a filter pool manager without creating the default filter pool

org.eclipse.rse.core.subsystems.SubSystem
SubSystem now implements IServiceSubSystem
internalSwitchServiceSubSystemConfiguration(IServiceSubSystemConfiguration) was added - should be overridden by service subsystems
canSwitchTo(IServiceSubSystemConfiguration) was added per IServiceSubSystem - should be overridden by service subsystems
switchServiceFactory(IServiceSubSystem) was added per IServiceSubSystem - provides the default implementation for this method for all service subsystems. Should not be overridden. Calls canSwitchTo(...) and internalSwitchServiceSubSystemConfiguration(...)
getServiceType() was added perIServiceSubSystem - should be overriden by service subsystems

org.eclipse.rse.core.subsystems.SubSystemConfiguration
getFilterPoolManager(ISystemProfile) was changed per ISubSystemConfiguration
getFilterPoolManager(ISystemProfile, boolean) was added per ISubSystemConfiguration

Comment 9 Martin Oberhuber CLA 2008-02-12 16:19:11 EST
Marking as breaking API change because
    ISystemProfile#createHost(IRSESystemType, String, String, String)
was removed, among other changes.

Thanks Dave for your excellent work on this. According to Plug-in Registry, on a clean workspace (Only "Local" systemType, nodes collapsed), only the following plugins are activated now:

org.eclipse.rse.connectorservice.local
org.eclipse.rse.core
org.eclipse.rse.files.ui
org.eclipse.rse.services
org.eclipse.rse.services.local
org.eclipse.rse.shells.ui
org.eclipse.rse.subsystems.files.core
org.eclipse.rse.subsystems.files.local
org.eclipse.rse.subsystems.shells.core
org.eclipse.rse.subsystems.shells.local
org.eclipse.rse.ui

Whereas before the fix, ALL subsystems were activated. And what's best, at least for me the performance improvement can be felt when switching to the RSE perspective, RSE comes up a lot faster now.

Let's follow up with these great achievements by ensuring that UI plugins are not loaded when nodes are collapsed (bug 190231, bug 181939, bug 218304, bug 196942)!
Comment 10 David Dykstal CLA 2008-02-18 11:13:24 EST
closing