Bug 40174

Summary: Performance issues with builder
Product: [Eclipse Project] JDT Reporter: Tal Lev-Ami <tla>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: 2.1   
Target Milestone: 2.1.2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
The new version of ClasspathJar with the cache.
none
A small improvement - modification time comparison is exact and added size comparison none

Description Tal Lev-Ami CLA 2003-07-16 03:31:30 EDT
We are using eclipse 2.1.1 on windows 2000. All our projects reside on a main 
samba server including multiple jars, some of them large (e.g. weblogic.jar).

Building a project (even in increamental build caused by a save operation) is 
very time consuming. 
We already moved our output directory locally (using linked resource).
We found out that a large portion of the compilation time is spent 
in "ClasspathJar.isPackage". In that method all the entries of the jar are read 
to find what packages are available in the jar to optimize class search later. 
The result is cached for further use. The problem is that this cache is local 
to the compiling project and is cleared after the end of each build!
Thus for every project built (even if multiple projects are built at once), 
this operation is performed, and takes a long long time.

Attached is a patch to org.eclipse.jdt.internal.core.builder.ClasspathJar that 
caches the available packages per jar and reloads only if the modification time 
has changed.

In our environment is cause a significat performance improvment.

-- Tal Lev-Ami
Comment 1 Tal Lev-Ami CLA 2003-07-16 03:36:04 EDT
Created attachment 5471 [details]
The new version of ClasspathJar with the cache.
Comment 2 Philipe Mulet CLA 2003-07-16 05:26:02 EDT
Good find, will consider for next milestone. Do you need it to be backported in 
2.1.1 stream, or are you all set with your manual patch ?

Kent - is the batch environment needing to be upgraded in a same fashion ?
Comment 3 Tal Lev-Ami CLA 2003-07-16 05:45:12 EDT
I will appreciate a fix in the 2.1.1 stream as well. I don't want to keep 
maintaining this patch.

Thanks,
-- Tal Lev-ami
Comment 4 Tal Lev-Ami CLA 2003-07-17 05:54:04 EDT
Created attachment 5490 [details]
A small improvement - modification time comparison is exact and added size comparison
Comment 5 Kent Johnson CLA 2003-07-30 14:49:26 EDT
Released into HEAD.

Still need to backport to 2.1.x stream.

Thanks Tal
Comment 6 Kent Johnson CLA 2003-08-13 15:27:19 EDT
Backported to 2.1.1 maintenance stream.

Thanks again.
Comment 7 David Audel CLA 2003-08-28 04:46:36 EDT
Verified.
Comment 8 Philipe Mulet CLA 2003-09-04 12:45:47 EDT
Candidate for 2.1.2
Comment 9 Frederic Fusier CLA 2003-10-17 06:49:48 EDT
Verified in build 2.1.2 RC1 that code was added in the stream
Comment 10 Jerome Lanneluc CLA 2003-10-23 06:48:57 EDT
Verified in build 2.1.2 RC2 that code is present