Bug 409969 - Target Platform GC should run more often
Summary: Target Platform GC should run more often
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2013-06-05 10:40 EDT by Andrew Niefer CLA
Modified: 2013-09-25 14:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2013-06-05 10:40:23 EDT
TargetPlatformPreferencePage.runGC is called only when a target has been removed from the preferences.  

My current Team's process for target platform is as follows:
- The releng build produces a new .target file for each build and delivers it to source control
- Team members accept the new .target file and then either reload the target from the preferences, or select "Set as Target Platform" in the target editor.

As time goes by, the target moves forward on the versions of bundles it contains, old versions remain in the target folder and GC is never called because team members don't normally need to remove targets.


As an example, a teammate has used the same workspace & targets for a relatively long time.  His .metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins folder on disk was 5.9GB.  He manually triggered a GC by doing:
Preferences -> Target Plaform > Add.. > Start with empty definition > finish
Apply
Select New Target > Remove
OK

GC then ran, and when complete his bundle_pool was reduced to 695MB
Comment 1 Curtis Windatt CLA 2013-06-05 10:59:09 EDT
Related to Bug 310972.  We need to check that GC is working correctly and make it happen more often.  Finding time for this in the last few releases has been difficult.  Will mark for consideration in 4.4.
Comment 2 Curtis Windatt CLA 2013-09-25 14:29:35 EDT
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=562d47136fa68be6b09d0bc5b2e4dbd2766d3bbf
Fixed in master, the GC will run whenever the load target job would run from the preference page.  This is more aggresive, as changing an existing target then reverting it later could require all the bundles to be redownloaded.  However, most likely users are updating their targets, in which case deleting the old content is beneficial.  I confirmed that the GC will not delete downloaded content as long as one target definition references it.