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

Don't call recalcBlockCounts on the client #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpenilla
Copy link
Member

This logic is expensive, and we only need to know if there may be any special colliding blocks in the section.

Before this change, ClientboundLevelChunkWithLightPacket was the top contributor to frame time spikes, after this change it's nowhere near the top of the profile. Specifically, the recalc logic was taking upwards of 80% of the processing time for this packet, the simplified check only takes <5%.

This logic is expensive, and we only need to know if there may be any special colliding blocks in the section.

Before this change, ClientboundLevelChunkWithLightPacket was the top contributor to frame time spikes, after this change it's nowhere near the top of the profile. Specifically, the recalc logic was taking upwards of 80% of the processing time for this packet, the simplified check only takes <5%.
@jpenilla jpenilla linked an issue Sep 17, 2024 that may be closed by this pull request
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.

[Issue] Lag spikes in rendering thread
1 participant