Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize JEI multiblock preview allocations #2629

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

TechLord22
Copy link
Member

What

Changes WorldSceneRenderer to use a Set<BlockPos> instead of a strange map, and uses Set#contains instead of a stream for TrackedDummyWorld's renderFilter predicate. This drastically reduces allocations in multiblock previews.

Outcome

Improves multiblock preview rendering performance.

Additional Information

This change breaks rendering in the terminal's auto build UI such that it does not display blocks after it auto places. I did not notice any change in the AR preview. Both of these are in a deprecated/soon to be removed state, so this should be fine for now.

@TechLord22 TechLord22 requested a review from a team as a code owner September 28, 2024 22:30
@TechLord22 TechLord22 added the type: bug Something isn't working label Sep 28, 2024
…timize

# Conflicts:
#	src/main/java/gregtech/api/terminal/gui/widgets/MachineSceneWidget.java
#	src/main/java/gregtech/common/terminal/app/multiblockhelper/MachineBuilderWidget.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants