Bug 46093

Summary: [Builder] Unoptimal pre-check for not writing class files
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: John_Wiegand
Version: 3.0   
Target Milestone: 2.1.3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2003-11-05 07:21:43 EST
Build 3.0M4

From John Wiegand:

The problem is that the pre-check to not write class files is too early.  (I 
also think the pre-check is inaccurate - it says don't even try to optimize too 
often - I changed one source file and it wrote 300 identical classes).  Since 
it is early, we do the structural compare check even on classfiles with 
identical bytes.
Comment 1 Philipe Mulet CLA 2003-11-05 08:02:10 EST
Actually, we want to ensure we dump newer classfiles for any touched source 
file (modify a comment only), so that we are resilient with any other tool 
which is using timestamps.

However, in the case we indicted files from binary changes only, we shouldn't 
force to dump them unless they really did change.

Comment 2 Philipe Mulet CLA 2003-11-05 08:04:21 EST
However, unless one true structural change did occur during this project build, 
this unoptimal behavior shouldn't impact dependent projects (related to bug 
14103).
Comment 3 Kent Johnson CLA 2003-11-05 17:07:34 EST
We now set a flag in the initial SourceFiles found in the first source delta 
walk. Only these source files will ensure that their .class file is updated.

Changed AbstractImageBuilder, IncrementalImageBuilder and SourceFile.

In a full Eclipse source workspace, adding a method to IResource took 55 
seconds instead of 70. Adding a method to Path to 25 seconds instead of 30.
Comment 4 Kent Johnson CLA 2003-11-06 12:31:49 EST
Backported to the 2.1.x stream.
Comment 5 David Audel CLA 2003-11-24 12:47:46 EST
Verified for 3.0M5
Comment 6 David Audel CLA 2004-03-01 12:32:42 EST
Verified for 2.1.3 (M20040225)