Bug 174920

Summary: [model] closing a single project causes all variables and containers to be saved
Product: [Eclipse Project] JDT Reporter: Eric Jodet <eric_jodet>
Component: CoreAssignee: Eric Jodet <eric_jodet>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: frederic_fusier, jerome_lanneluc, philippe_mulet
Version: 3.3Keywords: contributed, performance
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Proposed fix
none
Performance test case
none
Corresponding patch for R3_2_maintenance branch none

Description Eric Jodet CLA 2007-02-21 02:09:34 EST
When closing a project, the JavaModelManager saves all variables and containers
in the workspace.
This impacts the close project operation performance.
Comment 1 Eric Jodet CLA 2007-02-21 02:47:06 EST
Created attachment 59455 [details]
Proposed fix

The saving method of the JavaModelManager was modified to use the information available in the ISaveContext param.
This to narrow the saving of containers only to closed projects.

With this fix, I observed an average gain of 30 % on the time necessary to close the 120 projects in my test workspace.
Comment 2 Eric Jodet CLA 2007-02-22 09:22:03 EST
Created attachment 59569 [details]
Proposed fix

Frédéric: as discussed, new patch with the TODO
Comment 3 Eric Jodet CLA 2007-03-16 03:05:13 EDT
Created attachment 61053 [details]
Performance test case

Contains the FullSourceWorkspaceModelTests::testCloseProjects test case
Comment 4 Jerome Lanneluc CLA 2007-03-22 05:47:22 EDT
Patch looks good. Please release during M7.
Comment 5 Frederic Fusier CLA 2007-03-26 06:41:56 EDT
Patch released for 3.3 M7 on HEAD after resynchronization on top of v_745...
Comment 6 Frederic Fusier CLA 2007-03-26 06:44:48 EDT
Is it OK to backport this fix on R3_2_maintenance stream?
Comment 7 Jerome Lanneluc CLA 2007-03-26 07:56:37 EDT
For now, please just prepare the patch against R3_2_maintenance. We will decide later if this needs to be released to R3_2_maintenance
Comment 8 Frederic Fusier CLA 2007-03-28 10:42:56 EDT
Created attachment 62232 [details]
Corresponding patch for R3_2_maintenance branch

Note that this patch has been done on top of R3_2_maintenance branch which as
this time, and for the concerned modified classes, should be equivalent to
version v_686_R32x...
Comment 9 Jerome Lanneluc CLA 2007-04-27 04:54:03 EDT
Verified for 3.3M7 with I20070427-0010