Bug 31342 - Switching tabs in launch configuration very slow
Summary: Switching tabs in launch configuration very slow
Status: RESOLVED DUPLICATE of bug 29175
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2003-02-07 12:13 EST by John Arthorne CLA
Modified: 2003-02-09 14:47 EST (History)
1 user (show)

See Also:


Attachments
HTML OptimizeIt output of method invocations for one tab switch (58.94 KB, text/html)
2003-02-07 12:14 EST, John Arthorne CLA
no flags Details
Launch configuration file (18.99 KB, text/plain)
2003-02-07 12:15 EST, 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 2003-02-07 12:13:48 EST
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.
Comment 1 John Arthorne CLA 2003-02-07 12:14:55 EST
Created attachment 3365 [details]
HTML OptimizeIt output of method invocations for one tab switch
Comment 2 John Arthorne CLA 2003-02-07 12:15:35 EST
Created attachment 3366 [details]
Launch configuration file
Comment 3 Darin Wright CLA 2003-02-09 14:47:17 EST
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 ***