Bug 13468 - Open Java Editor takes 9+ minutes
Summary: Open Java Editor takes 9+ minutes
Status: RESOLVED DUPLICATE of bug 13393
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-10 18:20 EDT by Jed Anderson CLA
Modified: 2002-04-17 03:44 EDT (History)
3 users (show)

See Also:


Attachments
Stack trace from a Ctrl-Break (9.42 KB, text/plain)
2002-04-10 18:21 EDT, Jed Anderson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jed Anderson CLA 2002-04-10 18:20:20 EDT
Build: 20020409

I am running on a Pentium IV 1.5G machine with 512M of RAM & Win2k.  When I 
start Eclipse I use the command line arg "-vmargs -Xmx384M".

I have a selfhosting workspace that has 268 binary plugins.  I navigate into a 
jar file from the Java perspective and double click a class file it takes 9+ 
minutes to open the Java editor on the file.

During the 9+ minutes I periodically do a Ctrl-Break.  I will attach a sample 
stack trace to this bug.  All of the stack traces are identical up to the last 
3-5 stack frames.

In the middle of the stack trace you can see that the Outliner is attempting to 
draw the override indicators on methods.  If I turn off the decorators, the 
editor comes up in <5 seconds.
Comment 1 Jed Anderson CLA 2002-04-10 18:21:24 EDT
Created attachment 575 [details]
Stack trace from a Ctrl-Break
Comment 2 Erich Gamma CLA 2002-04-10 18:44:09 EDT
Stack trace indicates computing override indicators which involves computing a 
type hierarchy.

need to investigate
Comment 3 Martin Aeschlimann CLA 2002-04-11 08:01:21 EDT
Is this every time you open an editor? Or only the very first time?

Does it matter which file? Is a CU with lots of inner types?
Comment 4 Jed Anderson CLA 2002-04-11 14:38:20 EDT
Every time I open the editor it takes 9+ minutes, but I do not see the behaviour
on any code.  For example, I can open System in ~10 seconds.  The code I was
opening was in a jar that was in a project that was dependent upon many other
projects in the system.  I did not set the jar source for this jar, but it found
the source anyway.

One place to look in is JarPackageFragmentRoot.openWhenClosed(), every time I
hit Ctrl-Break, the stack dump indicates that the program is somewhere in that
code.  An obvious cluprit is getSourceAttachmentRecommendation, which searches
through every project in the workspace.  However, when I hacked that code out,
it didn't change the timing, so I think the problem is deeper.
Comment 5 Erich Gamma CLA 2002-04-11 18:16:50 EDT
Jed could you please make your workspace available so that we can reproduce the 
problem. Also carboned Philippe. 
Comment 6 Jed Anderson CLA 2002-04-11 18:33:35 EDT
I hope the following statistics help:

The class has:
3 superclasses (besides Object) all of which are abstract
6 super interfaces
2 inner types
43 fields
73 methods implemented from interfaces
14 methods overwritten from super types
124 methods total (including the 73 & 14 above)

There are 1022 jars in my workspace.
Comment 7 Jed Anderson CLA 2002-04-11 18:51:47 EDT
Steps inside the workspace to reproduce the problem:

1. Close all editors
2. Turn "Show override indicators in outline and hierarchy" on (Preferences-
>Java->Appearance)
3. Open HTMLEditor, it will take a long time.

Make sure to launch Eclipse using java.exe (not javaw.exe) on a windows box so 
you can Ctrl-Break to get stack traces.
Comment 8 oliver jehle CLA 2002-04-15 04:56:52 EDT
on my systems linux  the problem exists also
with integration build 11042002.


if you open a java file from an existing project.. 
you have to wait.... very long.... about 3-4 minutes
using about 99% cpu... 




Comment 9 oliver jehle CLA 2002-04-15 06:40:40 EDT
for me it looks like Bug 13393... 

when i use weblogic.jar in the build path, the open uses about 1-2 minutes using
100% cpu, without, the file opens in 3 seconds.... 


i worked on the same project with the same build path and sources with stable
release 20020214 without any problems...

Comment 10 Philipe Mulet CLA 2002-04-15 07:11:11 EDT
We are currently tracking this one, and noticed that there could be 
circumstances where our package cache is filled, and from thereon it gets 
partially flushed. Thus some simple actions will request the package collection 
to be recomputed over and over again (since it doesn't fit in the cache).

Our package cache can currently contains 1000 packages, and this seems quite 
not sufficient. From thereon, any name resolution will need to figure the 
package and type name part, thus will need the package cache to be filled 
correctly (on each hierarchy, reconciling iteration).
Comment 11 Martin Aeschlimann CLA 2002-04-17 03:44:43 EDT

*** This bug has been marked as a duplicate of 13393 ***