Skip to content

the performance issue reported in [#112](https://github.com/m3t4f1v3/voxy/issues/112)#1

Open
baiyin1223 wants to merge 2 commits into
flierfish:mc_1201from
baiyin1223:mc_1201
Open

the performance issue reported in [#112](https://github.com/m3t4f1v3/voxy/issues/112)#1
baiyin1223 wants to merge 2 commits into
flierfish:mc_1201from
baiyin1223:mc_1201

Conversation

@baiyin1223

Copy link
Copy Markdown

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:

  • Full renderer recreation being triggered on every call
  • Unnecessary System.gc() invocations adding overhead
  • Double glFinish() calls causing excessive GPU synchronization

Changes Made

  • Added debounce/cooldown mechanism: Prevents rapid successive renderer recreations by introducing a cooldown period
  • Removed unnecessary System.gc() call: Eliminates forced garbage collection that was contributing to lag spikes
  • Replaced double glFinish() with single glFlush(): Reduces GPU synchronization overhead while maintaining correctness

Testing

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.

baiyin1223 and others added 2 commits April 11, 2026 14:06
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.

1 participant