Community
Participate
Working Groups
Build: I20030206 (200302061700) I have a launch configuration that I've had around forever that is extremely slow to switch between tabs. It takes 1-2 seconds to switch tabs on my machine (2.33 GHZ PIV with 782MB RAM), even if I don't change a thing. I've finally come up with a reproducible case: 1) Start a new workspace 2) Import org.eclipse.jdt.ui plugin, and all pre-requisites, using the plugin import wizard 3) Create a java project with a simple hello world class 4) Create a launch configuration for the hello world class 5) On the "Source" tab of the config, deselect "Use default source lookup...". 6) Click Add Projects... 7) Click "Select All" 8) Click OK 9) Apply this launch config, then close config dialog and reopen it. 10) Now switching between tabs in this config is very slow. I am attaching an OptimizeIt profile trace of a single tab switch in this configuration. It shows that *every time* I switch tabs, even if I've touched nothing, it is parsing 138 XML documents. For your convenience I'll also attach the config file created using the above steps.
Created attachment 3365 [details] HTML OptimizeIt output of method invocations for one tab switch
Created attachment 3366 [details] Launch configuration file
This is actually the same problem as bug 29175. I have improved the performance by avoiding the document parsing when comparing runtime classpath entry lists (instead, a string compare ignoring whitespace is performed). Another optimization could be made, but would break the forward/backward compatibility story. So, as long as performance is reasonable now (it feels OK), I propose we defer this type of optimization until 2.2 or later. The other optimization that could be made is storing the classpath as a single XML docuemnt rather than a list of documents (currently, each classpath entry is represented be a memento which is a stand-alone XML doc). *** This bug has been marked as a duplicate of 29175 ***