Bug 13756

Summary: Code Completion + Type Introspection
Product: [Eclipse Project] JDT Reporter: Avinash Chugh <avi_chugh>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Avinash Chugh CLA 2002-04-14 15:18:53 EDT
I'm using latest integration build of Eclipse on Windows 2000 Server and Sun's 
1.3.1 JDK. I set-up Java project in Eclipse, setup CVS repository, checked-out 
java files into "source" folder. I was able to run ant-script too - all classes 
went in to "classes" folder. Now when I opened a Java file, I was able to use 
code-completion most of places - I had lib\rt.jar and weblogic.jar in build-
path for the project. However, I wanted code-completion on classes we had 
written that were also being used.

So I added "classes" folder to build-path for the project. When I tried to open 
any of the "source" Java files, it would now take 4-5 minutes before I would 
see the file...CPU usage for associated Java process would go to 95% 
(sometimes, not always). I could do code-completion on package-name (Eclipse 
would crawl when I did ctrl+space after "."). However, Eclipse was not able to 
see any of the classes - only the packages under "classes" folder. This was 
confirmed when I did "Go To Type" and "Go To Package" - I saw our packages in 
the dropdown - but none of our classes.

So I restarted my Eclipse - jar-ed up my classes, and this time added the jar 
to build-path for the project. Now I was able to see both our packages and our 
classes. However, Eclipse still "takes ages" opening a Java file - and crawls 
when I use code completion feature. I have to wait more than a minute before I 
can see the drop-down with the method-signatures. CPU usage goes to over 95%. 

If I remove my "classes" jar from the build-path, auto-complete works fine. 
Except for code which uses/inherits my classes - and of course, I get "type 
cannot be resolved" whenever I hover over any of my classes/interfaces.
Comment 1 Philipe Mulet CLA 2002-04-15 07:24:09 EDT
This is a combination of 2 problems:
- bogus refresh when dealing with classfiles on a lib folder.
- performance when using the weblogic.jar

So this relates to both bug 9263 & bug 13393
Comment 2 Philipe Mulet CLA 2002-04-16 07:33:54 EDT
Comments from original reporter:

I didn't have performance issues when I had just jre\lib\rt.jar and 
weblogic.jar in build-path for the project. I experienced those problems 
only when I added jar with my class-files to the build-path..

Regards,
Avinash.
Comment 3 Philipe Mulet CLA 2002-05-02 14:07:52 EDT
Please check this scenario to see if we still have a performance issue with 
classfiles.
Comment 4 Jerome Lanneluc CLA 2002-05-07 05:47:57 EDT
I believe I cannot have access to the weblogic.jar because of licensing issue. 
Maybe Avinash can confirm that there is no more performance problem with M5 + 
jdtcore patch?
Comment 5 Jerome Lanneluc CLA 2002-05-13 04:45:00 EDT
Avinash confirmed by email that this is no longer a problem in M5.
Closing.