Repository navigation
Drop the builders of a project when it is closed - #3084
bernd-wiswedel wants to merge 1 commit into
Conversation
|
Build fails due old tycho version, probably your branch is created on too old master state. If so, please rebase and force push. |
Thanks Christian, I wasn't aware. @bernd-wiswedel : no action needed from your side. I will retrigger build once infrastructure will work again. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to release builders when projects close.
No open issues 🎉
What changed in this PR
Addresses #3083 by releasing builders when a project closes, preventing their last-built workspace trees from retaining memory while preserving saved state for reopening.
Changes:
- Adds
BuildManager.dropBuildersto clear a project’s builder instances. - Calls it at the end of project closure, after builder state has been saved.
- Adds regression tests for builder release, restored incremental builds, and file changes made while closed.
| File | Description |
|---|---|
| resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/BuilderTest.java | Tests builder cleanup and incremental-build behavior after reopening. |
| resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java | Drops builders at the end of project closure. |
| resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildManager.java | Adds a helper to clear builder instances from project build commands. |
Review effort: Balanced
|
@bernd-wiswedel : looks good. We are currently in 4.42 RC2 phase, and this issue, while worth fixing, doesn't qualify for RC2 candidate. Can you please also add this small patch which should report error if we broke something internally on using the new method: |
A closed project kept its builder instances, and each builder kept the tree of its last build. Snapshots collapse only the trees of open projects, so such a tree kept every later workspace tree layer alive until restart. In an IDE with 3.6 GB live heap after two days, the builders of closed projects held 1.4 GB. The builder state is saved with the project tree before the project is closed, and reopening restores it from there, as after a restart. The builder instances are of no further use, so drop them on close. Fixes eclipse-platform#3083 Assisted-by: Anthropic Claude Opus 5.5 (claude-opus-5-5)
b76cbc4 to
bd23b02
Compare
|
Thanks, added your check to the commit. |
A closed project kept its builders, and with them the tree of their last build. Snapshots collapse only the builder trees of open projects, so these trees kept every later workspace tree layer alive until restart: 1.4 GB of 3.6 GB live heap in my IDE. This drops the builders at the end of
Project.internalClose, after the close has saved the builder state. Reopening already replaces the project with its saved tree and creates new builders from the saved state, so builds after a reopen behave as before.The new tests in
BuilderTestcheck that closing drops the builders, that a reopened project keeps its last built state and builds incrementally, and that a file changed while the project was closed shows up in the next build's delta.Fixes #3083
🤖 Generated with Claude Code