eclipse-platform / eclipse-platform/eclipse.platform

[memory] JavaBuilder.oldState leaks into Workspace.tree

Aperta
#910 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
165
Fork
174
Merge medio
2g 8h
PR unite (30g)
22

Descrizione

In the heapdump of https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/pull/1612 most memory was hold by org.eclipse.core.internal.resources.Workspace.tree.
VisualVM:
![image](https://github.com/eclipse-platform/eclipse.platform/assets/51790620/3f4dc0c2-af0e-497a-823c-9992e715b65b)

![image](https://github.com/eclipse-platform/eclipse.platform/assets/51790620/04b8f220-9dc7-42a1-b72f-b646c68a0f74)
JDKMC:
![image](https://github.com/eclipse-platform/eclipse.platform/assets/51790620/e099ae0c-18a1-44f8-ba9e-08155f5984bc)

Workspace.tree is meant to store the state of the Workspace. It does so by storing the history of changes (DeltaDataTree) to the workspace. Interestingly the workspace also stores all IncrementalBuilders which again contain references to the old trees.
I.e the Workspace stores a history of things that contain their history.
That org.eclipse.core.internal.events.InternalBuilder.oldState sounds like a leak - or say - something that unintentionally stores more memory then intended.

I have however no idea how to reduce that since an IncrementalBuilders needs to know the oldState to calculate increments. Just that the old state is stored again as a history feels odd.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.