| Summary: | Memory leak using Synchronize | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Marc-André Laperle <malaperle> | ||||||
| Component: | UI | Assignee: | Project Inbox <egit.ui-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | angvoz.dev, dariusz.luksza, dj.houghton, eclipse.bsquare, hceylan, jens.baumgart, matthias.sohn, nikolaymetchev, remy.suen, robin | ||||||
| Version: | 1.1 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 369015 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
Created attachment 199792 [details]
Memory Analyser dominator tree screenshot
*** Bug 352743 has been marked as a duplicate of this bug. *** Also note that cloning 4 repositories (just did a clone, haven't added any projects to my workspace, repositories were eclipse.platform.runtime, rt.equinox.bundles, rt.equinox.framework, rt.equinox.p2) increased my memory consumption by about 100M. I have also experienced this leak. In my instance, I am working with a relatively large project - ~ 15K files. I have also tested with memory analyzer and got similar results. For every invocation of "Team -> Synchronize Workspace" action leaves org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber with 12.5 MB memory footprint. Disconnecting /+ closing project doesn't cause the memory to be released. Regards, Hasan Ceylan I see 3 reason why Synchronize is leaking memory 1. team.internal.ui.mapping.DiffTreeChangesSection adds a JobChangeListener and never removes it 2. The swt.Link in the Progress view keeps a reference to a RefreshParticipantJob and doesn't disappear when removing synchronization or starting a new one. This can be worked around by Removing all finished operations in Progress view. 3. When the Synchronize view is empty, CommonViewerAdvisor.emptyTreeListener keeps a reference to the last DiffTreeChangesSection. This can be worked around (kind of) by doing a Synchronize with Patch after the Git Sychronize which will still hold a reference to a DiffTreeChangesSection but will use much less memory. I see Synchronize leaking even with "Sychronize with Patch" so it looks like these might be platform.team leaks. I know for sure 1 and 3 are. With commit f52917721af7c7dfce44cc655fb3586a811793fb synchronize view should dispose all used resources when new synchronization process is launched. Also change df7527930d3ff1b4529e7716a27e33d2f3d6bde2 should enable synchronize feature for large time periods (eg. comparing linux 2.6.30 with 2.6.32; it'll take some time and memory but it should eventually finish) Thanks for investigating this, Marc-Andre. Another problem was fixed with bug 396209. Please open new bugs if there are still any problems. |
Created attachment 199791 [details] Memory Analyser problem suspect screenshot Using Eclipse EGit 1.1.0.201107042014 Eclipse JGit 1.1.0.201107011217 -Xmx1000m -XX:MaxPermSize=256m 1. Clone CDT repo (probably can reproduce with other repos) 2. In Git perspective, Right-click on a local branch, Synchronize with workspace. Wait for the synchronize to finish. 3. Repeat step 2 over and over again. Eventually you can run out of memory. If you open Memory Analyzer, you will see a lot of instances of org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber taking a lot of memory.