Skip to content

[Memory-opti:fix leak] fix three world leaks - #32

Merged
Alexdoru merged 10 commits into
masterfrom
alex/fix-leak
May 5, 2026
Merged

[Memory-opti:fix leak] fix three world leaks#32
Alexdoru merged 10 commits into
masterfrom
alex/fix-leak

Conversation

@Alexdoru

@Alexdoru Alexdoru commented May 4, 2026

Copy link
Copy Markdown
Member

this pr is a lot of automate code fixes, and the bug fix are actually 10 lines of code

image image

@Alexdoru Alexdoru changed the title fix two world client leaks [Memory-opti:fix leak] fix two world client leaks May 4, 2026
@Alexdoru Alexdoru changed the title [Memory-opti:fix leak] fix two world client leaks [Memory-opti:fix leak] fix three world leaks May 4, 2026
@Alexdoru
Alexdoru requested a review from a team May 4, 2026 20:28
@DarkShadow44

Copy link
Copy Markdown

I can take a look tomorrow or so, if nobody else is faster

@Guvante

Guvante commented May 5, 2026

Copy link
Copy Markdown

Is there no performance benefit of caching here anymore?

@Alexdoru

Alexdoru commented May 5, 2026

Copy link
Copy Markdown
Member Author

Is there no performance benefit of caching here anymore?

Caching what?

@Guvante

Guvante commented May 5, 2026

Copy link
Copy Markdown

The leaking code looks to be caching something in a thread local to minimize lookups, I just didn't see a comment as to why that wasn't valuable so asked

@Alexdoru

Alexdoru commented May 5, 2026

Copy link
Copy Markdown
Member Author

The leaking code looks to be caching something in a thread local to minimize lookups, I just didn't see a comment as to why that wasn't valuable so asked

chunk lookups are O(1) there is no need to cache anything

@Guvante Guvante left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but had a few "is this code bugged" questions

Comment thread src/main/java/buildcraft/core/lib/utils/BlockUtils.java
Comment thread src/main/java/buildcraft/core/tablet/manager/TabletThread.java
Comment thread src/main/java/buildcraft/robotics/ai/AIRobotDeliverRequested.java
Comment thread src/main/java/buildcraft/robotics/ai/AIRobotPumpBlock.java
Comment thread src/main/java/buildcraft/robotics/render/RenderZonePlan.java
@Alexdoru
Alexdoru merged commit d41f130 into master May 5, 2026
1 check passed
@Alexdoru
Alexdoru deleted the alex/fix-leak branch May 5, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants