Skip to content

Reduce AbstractContainerMenu allocations#647

Merged
Dreeam-qwq merged 2 commits intover/1.21.11from
opt/reduce-abstract-container-menu-alloc
Mar 24, 2026
Merged

Reduce AbstractContainerMenu allocations#647
Dreeam-qwq merged 2 commits intover/1.21.11from
opt/reduce-abstract-container-menu-alloc

Conversation

@HaHaWTH
Copy link
Member

@HaHaWTH HaHaWTH commented Feb 18, 2026

Allocating Supplier in broadcastChanges every loop causes high GC pressure and also hurts performance with a high player count:

image

@Dreeam-qwq Dreeam-qwq added the type: optimization Pull request for optimization label Feb 25, 2026
To make get call branchless, and also keep original behavior (refresh item cache in every loop)
Copy link
Member

@Dreeam-qwq Dreeam-qwq left a comment

Choose a reason for hiding this comment

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

tql

@Dreeam-qwq Dreeam-qwq merged commit 83e32d0 into ver/1.21.11 Mar 24, 2026
1 check passed
@Dreeam-qwq Dreeam-qwq deleted the opt/reduce-abstract-container-menu-alloc branch March 24, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: optimization Pull request for optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants