eclipse-platform / eclipse-platform/eclipse.platform

[memory] JavaBuilder.oldState leaks into Workspace.tree

Đang mở
#910 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
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:
![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.

Hướng dẫn đóng góp

Mở 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.