Editor improvements test#4565
Open
AiAe wants to merge 2 commits into
Open
Conversation
| ThreadScheduler.Run(() => | ||
| { | ||
| HitObjects.ForEach(x => x.Destroy()); | ||
| if (HitObjects.Count < 1000) |
Member
There was a problem hiding this comment.
What does this 1000 mean here? What happens if the count is greater than or equal to that number?
Member
Author
There was a problem hiding this comment.
Updated EditorPlayfield.Destroy() to skip the individual Destroy() loop for maps with more than 1,000 objects, relying on Garbage Collection for cleanup since event references are now handled centrally and dropped instantly.
From my testing even tho I'm not 100% sure I agree with the solution it does still free up a lot of memory combined with the rest of the changes.
But we can probably revert that line.
Warp9000
approved these changes
Apr 27, 2026
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 of changes:
HitObjectColoringandSelectedHitObjectsfrom individualEditorHitObjectKeysinstances to theEditorPlayfield.HitObjectMap(Dictionary) inEditorPlayfieldto allowEditorPlayfield.Destroy()to skip the individualDestroy()loop for maps with more than 1,000 objects, relying on Garbage Collection for cleanup since event references are now handled centrally and dropped instantly.These changes ensure that exiting the editor is near-instant even for maps with a very high number of hit objects, without affecting other editor components.
Tests
Tested with https://quavergame.com/mapset/map/27824
Stats from Local build + Quaver/Wobble#169 & #4564 vs Canary 1.7.0.12:
Raw Measurements
Derived Stats
Peak memory (in editor):
Memory retained after exit (vs selecting song):
Retention multiplier (Canary vs Local):
Raw Measurements
Derived Stats
Peak memory (in editor):
Memory retained after exit (vs selecting song):
Retention multiplier (Canary vs Local):