Improve editor performance with many timeline ticks present #27632
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.
This particular example looks unrealistic, but it's allowed via editor means: we can set bpm to 10000 and zoom out as far as possible.
981ee54 fixes transforms allocation overhead.
34a5e2d is the same approach as in #27562. While the whole timeline is moving, we can guarantee that with the current implementation almost all ticks in the tree (except 16 ones used as a buffer) will be visible. I think it's okay to allow some overdraw including the fact that we are CPU-limited in most common cases anyway. Another bunch of problems comes from the fact that these ticks are rounded, so we can't batch them properly, but this should be fixed with SSBO, I believe? Also I would love to use
DrawNode
s to draw these, but again: we can't draw rounded rectangles directly.Potential best approach will be some sort of
BufferedContainer
usage, though this will require major changes.