Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Refactoring(2): Temp data are kept in memory after renaming #1048

Closed
sailingKieler opened this issue Apr 9, 2019 · 3 comments
Closed

Refactoring(2): Temp data are kept in memory after renaming #1048

sailingKieler opened this issue Apr 9, 2019 · 3 comments

Comments

@sailingKieler
Copy link
Contributor

The temporary resource sets created and populated during rename or move refactorings are kept in memory for too long, potentially for whole life of the application. That may happen if the language injectors are initialized in a ModalContextThread, which transitively holds the refactoring data, because Guice 3.0 injectors hold the creatingThread objects for their entire lifes, see

MemoryLeak

MemoryLeak2

IMO the observed scenario is hardly avoidable without changing the implementation ModalContext, modifying Guice, or significantly changing the initialization of the involved injectors. However, at least the ChangeSerializer instances with their temporary data should be disposed once the text changes have been prepared.

@sailingKieler sailingKieler added this to the Release_2.18 milestone Apr 9, 2019
@sailingKieler sailingKieler self-assigned this Apr 9, 2019
sailingKieler added a commit that referenced this issue Apr 9, 2019
…esourceRelocationProcessor' in favor of proper memory deallocation, addresses #1048
sailingKieler added a commit that referenced this issue Apr 9, 2019
…esourceRelocationProcessor' in favor of proper memory deallocation, addresses #1048

Signed-off-by: Christian Schneider <[email protected]>
@cdietrich
Copy link
Member

@sailingKieler can you please describe what is left open and what is already solved by your pr?

@sailingKieler
Copy link
Contributor Author

The problem described in the title

Temp data are kept in memory after renaming

is fixed, so the issue can be closed.
An open question is whether that aspect could be improved:

because Guice 3.0 injectors hold the creatingThread objects for their entire lifes

I saw that with Guice 4.1 that part changed significantly but I don't know wether it would be desirable or even possible to update Guice. Maybe a change of ModalContextThread should be proposed that adds dropping of the operation data once the thread is terminated.

@cdietrich
Copy link
Member

that would be eclipse/xtext-core#393

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants