Bug 274262 - [History] Allow to never prune history
Summary: [History] Allow to never prune history
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Pawel Pogorzelski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 357267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-29 05:16 EDT by Dani Megert CLA
Modified: 2016-10-11 05:51 EDT (History)
5 users (show)

See Also:


Attachments
Patch_v01 (41.93 KB, patch)
2009-10-08 12:17 EDT, Pawel Pogorzelski CLA
no flags Details | Diff
Patch_v02 (47.30 KB, patch)
2009-10-12 10:15 EDT, Pawel Pogorzelski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2009-04-29 05:16:21 EDT
I20090429-0100.

I never want to loose my history and I never want to waste time on shutdown (or start up) to do any history pruning.

Please add a preference to disable pruning entirely.
Comment 1 Markus Keller CLA 2009-04-29 07:01:00 EDT
AFAIK, the long delay is not mainly spent for removing too old / too big histories, but to do garbage collection of unreferenced history entries.

(In reply to bug 257167 comment #15)
> Long-term, I think the garbage-collection approach just doesn't scale. Bug
> 55182 comment 19 has a long analysis of this problem and possible solutions.
> That bug also references bug 66370 and bug 66371 for possible improvements.
Comment 2 Dani Megert CLA 2009-09-24 05:11:57 EDT
I'd like to see this sooner than later: each time I have to click the 'Cancel' button on shutdown. A fix should be pretty simple.
Comment 3 Pawel Pogorzelski CLA 2009-10-07 12:05:36 EDT
Dani, do you think with the switch set also "Maximum file size" should be ignored? It controls the maximum size of an entry in the history.
Comment 4 Dani Megert CLA 2009-10-07 12:16:47 EDT
>Dani, do you think with the switch set also "Maximum file size" should be
>ignored? It controls the maximum size of an entry in the history.
Only if it affects the performance on shutdown, otherwise I'd like to be able to specify it.
Comment 5 Pawel Pogorzelski CLA 2009-10-08 12:17:20 EDT
Created attachment 149134 [details]
Patch_v01

(In reply to comment #2)
> A fix should be pretty simple.

I won't take it that seriously next time ;)
Comment 6 Pawel Pogorzelski CLA 2009-10-08 12:27:59 EDT
(In reply to comment #1)
> AFAIK, the long delay is not mainly spent for removing too old / too big
> histories, but to do garbage collection of unreferenced history entries.

If you don't apply the policy for limiting history size the unreferenced entries are collected before shutdown, during operations like project deletion. During the shutdown BLOBs corresponding to these entries are removed but no history tree traversal is needed in such case.
Comment 7 Szymon Brandys CLA 2009-10-09 12:48:17 EDT
At first glance the fix looks good. I'll look at it again on Monday.
Comment 8 Pawel Pogorzelski CLA 2009-10-12 10:15:55 EDT
Created attachment 149363 [details]
Patch_v02

Minor update.
Comment 9 Szymon Brandys CLA 2009-10-13 05:27:21 EDT
Released to HEAD with some fixes in javadoc and code.
Comment 10 Szymon Brandys CLA 2009-10-13 05:38:57 EDT
Pawel, please open a bug to update help for the local history preferences page and take care of it.
Comment 11 Pawel Pogorzelski CLA 2009-10-14 05:50:00 EDT
(In reply to comment #10)
> Pawel, please open a bug to update help for the local history preferences page
> and take care of it.

Done, it's bug 292231.
Comment 12 Dani Megert CLA 2009-10-28 04:32:13 EDT
Verified in I20091027-0100.
Comment 13 John Arthorne CLA 2011-09-09 13:59:18 EDT
*** Bug 357267 has been marked as a duplicate of this bug. ***
Comment 14 Vasili Gulevich CLA 2016-10-11 05:45:55 EDT
I can see following code in current source:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java?id=7c3c71d443976edfcab48111f7939535acc8043a#n453

	if (applyPolicy)
		monitor = new CancelableProgressMonitorWrapper(
				monitor, p);

	status.merge(((Workspace) ResourcesPlugin
			.getWorkspace()).save(true, true, monitor));

it looks like applyPolicy is largely ignored and only controls progress monitor wrapping.


Could anyone confirm this was intended?


This was found when working on bug 501404
Comment 15 Dani Megert CLA 2016-10-11 05:51:05 EDT
(In reply to Vasili Gulevich from comment #14)
> I can see following code in current source:
> 
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java?id=7c3c71d443976edfcab48111f7939535acc8043a#n453
> 
> 
> 	if (applyPolicy)
> 		monitor = new CancelableProgressMonitorWrapper(
> 				monitor, p);
> 
> 	status.merge(((Workspace) ResourcesPlugin
> 			.getWorkspace()).save(true, true, monitor));
> 
> it looks like applyPolicy is largely ignored and only controls progress
> monitor wrapping.
> 
> 
> Could anyone confirm this was intended?
> 
> 
> This was found when working on bug 501404

This seems not related to this bug here. Also, please do not reopen resolved bugs, but file a new one. Thanks.