Bug 134172 - Crap Perfomance opening Java file with lots of imports
Summary: Crap Perfomance opening Java file with lots of imports
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2006-03-30 16:17 EST by Paul Smith CLA
Modified: 2007-07-29 09:19 EDT (History)
0 users

See Also:


Attachments
Yourkit 5 CPU snapshot taken during the opening of the file (1.84 MB, application/octet-stream)
2006-03-30 16:20 EST, Paul Smith CLA
no flags Details
File in question that takes forever to load (112.68 KB, text/plain)
2006-03-30 16:23 EST, Paul Smith CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Smith CLA 2006-03-30 16:17:59 EST
[Eclipse 3.2 M5]

We have an Eclipse project that represents an DB Installer, which includes all the schema changes to our application since the dawn of time.

There is one file, Install.java which contains imports to all the individual installer tasks that should/could be run up to a particular version.

When I try to open this java file on my Mac it effectively hangs.  I think it eventually opens, but it is pointless to wait that long.  I've had to resort to using a normal text editor.. :)

Note: None of our devs using Linux or Windows have this problem, I think it must be OSX only.  This file seems to have the most number of imports i've seen anyway.

ANyway, I took the liberty of attaching Yourkit 5 to Eclipse while it was in this state, and I will attach the Yourkit snapshot to this issue, along with the Install.java file in question (please don't laugh at this file, it's just "The Way it Is" here at the moment at least).

Looks like from the snapshot that opening of the file ends up continuosly opening a jar file?
Comment 1 Paul Smith CLA 2006-03-30 16:20:56 EST
Created attachment 37358 [details]
Yourkit 5 CPU snapshot taken during the opening of the file
Comment 2 Paul Smith CLA 2006-03-30 16:23:52 EST
Created attachment 37359 [details]
File in question that takes forever to load

What's weird is that the project only has about 12 jars in the build path.  

There are about 1000 install Java task clasess that may be included in this master Install.java.

Not an efficient class I know, but perhaps it highlights a bottleneck in Eclipse?
Comment 3 Jerome Lanneluc CLA 2006-03-31 05:37:15 EST
Are your jars on a network drive, or are they on a local drive ?
Comment 4 Paul Smith CLA 2006-03-31 17:18:31 EST
All local jars.  All in a OSX filesystem that has been set to be ignored by Spotlight too so that Spotlight isn't constantly analyzing those files.

We have 5 times more jars in another project and none of the java classes take this long to load.

cheers,

Paul
Comment 5 Paul Smith CLA 2006-04-02 04:17:38 EDT
Just installed 3.2 M6 and now this file opens up like a greased weasel!  w00t.

Marking as fixed (whatever you guys 'n gals did in m6 worked a treat).


Comment 6 Jerome Lanneluc CLA 2006-04-03 06:44:46 EDT
Glad it works for you now. Reopening this no action was taken on our side.
Comment 7 Jerome Lanneluc CLA 2006-04-03 06:45:25 EDT
No action was taken on this particular problem.
Comment 8 Jerome Lanneluc CLA 2006-04-04 04:34:11 EDT
Actually, there is still room for improvement. We can cache the jar files during reconcile.
Comment 9 Paul Smith CLA 2006-04-04 04:35:33 EDT
Well I won't complain... :)  (3.2 M6 rocks by the way, a dream to use on OSX).
Comment 10 Philipe Mulet CLA 2006-04-04 04:36:46 EDT
+1 for 3.2RC1
Comment 11 Jerome Lanneluc CLA 2006-04-04 06:11:02 EDT
Changed CompilationUnit#reconcile(...) to cache the zip files while running the reconcile operation.
Comment 12 David Audel CLA 2006-04-13 13:29:07 EDT
Verified for 3.2 RC1 using build I20060413-0010
Comment 13 Eclipse Webmaster CLA 2007-07-29 09:19:22 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991