Skip to content

[PERFORMANCE] Fix Memory Leaks caused by EditorVariableWaveform + Optimize it#262

Open
menvae wants to merge 3 commits into
InventiveRhythm:mainfrom
menvae:nice-view
Open

[PERFORMANCE] Fix Memory Leaks caused by EditorVariableWaveform + Optimize it#262
menvae wants to merge 3 commits into
InventiveRhythm:mainfrom
menvae:nice-view

Conversation

@menvae
Copy link
Copy Markdown
Contributor

@menvae menvae commented Apr 10, 2026

Changes

  • EditorVariableWaveform is now a BufffedContainer and we use .CreateView to draw it.
    • This means we only need to ever instantiate once and use it wherever without any performance costs
    • on the topic of performance:
      • Waveform is only drawn only when it's needed such as when time in clock changes or any drawable is actually rendering it. but it has to be manually untracked since OnDispose is internal and we don't untrack on all cases of dispose as is the case of PointListEntry
  • Created an OnClose virtual method in PointListEntry to know when point is closed. This is needed for untracking the point for the waveform when closing.

We track the drawables to know if it is IsPresent so we know to not render the waveform if any of the consumers aren't even rendered themselves.

FIxes #247

+ optimize EditorVariableWaveform
+ add notify closing for points
@menvae menvae changed the title Fix Memory Leaks caused by EditorVariableWaveform + Optimize it [PERFORMANCE] Fix Memory Leaks caused by EditorVariableWaveform + Optimize it May 3, 2026
@flustix flustix added bug Something isn't working area:editor labels May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editor bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EditorVariableWaveform Causes Memory Leaks From PointsList

2 participants