Bug 113371

Summary: Performance: discardWorkingPerCopyInfo emptys Cache before building Delta
Product: [Eclipse Project] JDT Reporter: Daniel von Dincklage <danielvd+ecbug>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Tod_Creasey
Version: 3.1.1Keywords: performance
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Possible fix none

Description Daniel von Dincklage CLA 2005-10-21 12:45:40 EDT
JavaModelManager::discardWorkingPerCopyInfo seems to discard the cache-entries
concerning the elements of the working copy immediately before building the
delta of the working copy and the original. 
As building the delta involves inspecting elements of the working copy, this
causes elements to be rebuilt, causing a performance hit. 

Is this the intended behaviour? (Have I missed some non-obvious constraints?)
Comment 1 Jerome Lanneluc CLA 2005-10-24 06:28:58 EDT
The delta is being built in the case of a primary working copy only. In this
case, the corresponding source on disk can be different than the source of the
working copy. This is why we're re-reading the content of the source on disk. 

We could indeed optimize the case where the source is the same. In this case the
delta will always be empty.
Comment 2 Jerome Lanneluc CLA 2006-02-17 11:07:06 EST
*** Bug 128430 has been marked as a duplicate of this bug. ***
Comment 3 Jerome Lanneluc CLA 2006-02-17 11:37:06 EST
Created attachment 34918 [details]
Possible fix
Comment 4 Jerome Lanneluc CLA 2006-02-27 04:52:30 EST
Released patch to HEAD
Comment 5 Maxime Daniel CLA 2006-03-27 09:36:28 EST
Verified for 3.2M6 using build I20060327-0010.
Comment 6 Jerome Lanneluc CLA 2006-03-28 11:27:47 EST
*** Bug 91732 has been marked as a duplicate of this bug. ***