eclipse-platform / eclipse-platform/eclipse.platform
[memory] JavaBuilder.oldState leaks into Workspace.tree
- Ngôn ngữ chính
- Java
- Star
- 165
- Fork
- 174
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 22
Mô tả
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:


JDKMC:

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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Sử dụng phân tích heap dump được liên kết làm điểm bắt đầu, sau đó đọc Workspace.tree, DeltaDataTree và InternalBuilder.oldState, bao gồm cả các tham chiếu oldState của JavaBuilder. Truy tìm lý do trạng thái của builder vẫn tiếp tục được giữ lại và xác định vòng đời dự kiến; issue được hoàn thành khi một phương pháp đã được review làm giảm việc giữ lại ngoài ý muốn và bao gồm bằng chứng cho thấy các incremental build vẫn hoạt động chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- performance, tooling
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100