Bug 174920 - [model] closing a single project causes all variables and containers to be saved
Summary: [model] closing a single project causes all variables and containers to be saved
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Eric Jodet CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, performance
Depends on:
Blocks:
 
Reported: 2007-02-21 02:09 EST by Eric Jodet CLA
Modified: 2007-06-06 13:42 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix (4.28 KB, patch)
2007-02-21 02:47 EST, Eric Jodet CLA
no flags Details | Diff
Proposed fix (4.35 KB, patch)
2007-02-22 09:22 EST, Eric Jodet CLA
no flags Details | Diff
Performance test case (2.23 KB, patch)
2007-03-16 03:05 EDT, Eric Jodet CLA
no flags Details | Diff
Corresponding patch for R3_2_maintenance branch (4.36 KB, patch)
2007-03-28 10:42 EDT, Frederic Fusier CLA
no flags Details | Diff

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