Bug 5913 - Performance - creating tons of classfile elements at startup
Summary: Performance - creating tons of classfile elements at startup
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-14 12:43 EST by Philipe Mulet CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2001-11-14 12:43:24 EST
When profiling the launch of Eclipse, with open Java perspective in workspace, 
I noticed a lot of ClassFile instances caused by a call to 
JavaProject.resetNonJavaResources, which caused all pkg fragment roots to be 
reset (JAR pkg fragment root are automatically populated down to class file 
handles).

The code for resetting non-java resources is no longer necessary given the new 
delta processor implementation.
Comment 1 Philipe Mulet CLA 2001-11-14 12:54:47 EST
Removed the unnecessary code causing model populating.
This reduced the amount of created ClassFile handles from 16000 down to 6500.

Now I still see that all these are created for no good reason.
through JavaProject.findPackageFragmentRoot(IPath) which needs a Namelookup,
to answer the question, and it is expensive to initialize.
Comment 2 Philipe Mulet CLA 2001-11-15 05:48:49 EST
Moved the offending code directly on the project, since a namelookup is not 
necessary to handle it anyway (iterating through all roots is all it needs).

Number of classfile now is: 0 !