[OPTIMIZATION] Fix a memory leak in the Freeplay Menu#6615
Merged
Hundrec merged 1 commit intoFunkinCrew:dummy/develop-v0.8.1from Feb 3, 2026
Merged
Conversation
|
OH MY GOD, FINALLY? |
NotHyper-474
approved these changes
Dec 28, 2025
Contributor
NotHyper-474
left a comment
There was a problem hiding this comment.
It's peak...
8mb.video-Pqq-FHiTHy1R.mp4
Contributor
How exactly do you get videos like this? |
Contributor
I used RenderDoc to dissect a frame and recorded it using OBS |
Contributor
And it's all a good 31 FPS! (According to the debug display) |
Contributor
That's because it captured it when the game was minimized and minimizing it lowers the FPS to 30 lol |
Contributor
|
Is it just me or does this make freeplay open faster? |
|
Emoji what the shit |
ed79a7d to
8d3dbd1
Compare
Co-Authored-By: Hyper_ <40342021+NotHyper-474@users.noreply.github.com> Co-Authored-By: Mario Hernando <97055307+MaybeMaru@users.noreply.github.com>
3829dcb to
5805c31
Compare
2 tasks
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.
Linked Issues
None, I think? I feel like a memory leak like this must've been reported before.
Description
Hyper told me that his Tracy session revealed that the memory leak happening from doing anything in Freeplay stemmed from a bunch of
drawQuadcalls, He suggested using quad batching to fix this. This PR utilizes that by implementing a group that changes how the capsules are rendered, rendering an element type per viable capsule before moving onto the next element.The code for this was adopted from MaybeMaru's implementation that they showcased a long time ago, just modified for funkin's codebase, hence why they're one of the co-authors.
Screenshots/Videos
who.up.batching.they.quad.mp4