the performance issue reported in [#112](https://github.com/m3t4f1v3/voxy/issues/112)#1
Open
baiyin1223 wants to merge 2 commits into
Open
the performance issue reported in [#112](https://github.com/m3t4f1v3/voxy/issues/112)#1baiyin1223 wants to merge 2 commits into
baiyin1223 wants to merge 2 commits into
Conversation
…eplace glFinish with glFlush
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses the performance issue reported in #112, where the
allChanged()method triggers a full rendering system rebuild, causing approximately 5-second freezes during gameplay.Problem Description
As described in the linked issue, the current implementation of
allChanged()results in significant stuttering due to:System.gc()invocations adding overheadglFinish()calls causing excessive GPU synchronizationChanges Made
System.gc()call: Eliminates forced garbage collection that was contributing to lag spikesglFinish()with singleglFlush(): Reduces GPU synchronization overhead while maintaining correctnessTesting
The changes have been built locally and tested in-game. The performance issues described in m3t4f1v3#112 are now resolved, with no more noticeable freezes during normal gameplay.
Notes
I submit the issue ,but I noticed that the original issue has not yet received a new response or fix from the author. I hope this contribution can help improve the experience for users encountering this problem. Please let me know if any adjustments are needed.