Bug 113371 - Performance: discardWorkingPerCopyInfo emptys Cache before building Delta
Summary: Performance: discardWorkingPerCopyInfo emptys Cache before building Delta
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 91732 128430 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-21 12:45 EDT by Daniel von Dincklage CLA
Modified: 2006-03-28 11:27 EST (History)
2 users (show)

See Also:


Attachments
Possible fix (984 bytes, patch)
2006-02-17 11:37 EST, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***