New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve editor performance for maps with many control points #27630
Conversation
[Resolved] | ||
private Timeline? timeline { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this nullable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was using TimelineTickDisplay
as a reference, will remove.
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - TopPointPiece.WIDTH) / DrawWidth * Content.RelativeChildSize.X, | ||
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopRight).X) / DrawWidth * Content.RelativeChildSize.X); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the left bound subtract TopPointPiece.WIDTH
and the right one subtract nothing, if TopPointPiece
is anchored top centre? Shouldn't the bounds be symmetrical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Remove groups outside the visible range | ||
for (int i = Count - 1; i >= 0; i--) | ||
{ | ||
var g = Children[i]; | ||
|
||
if (!shouldBeVisible(g.Group)) | ||
g.Expire(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to iterate backwards here? It's not like this is removing anything from the list as it's iterating over it? All expiration does is set LifetimeEnd
. Actual removal from composites happens in a separate pass elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All expiration does is set
LifetimeEnd
Which will make ShouldBeAlive
false and since RemoveWhenNotAlive
isn't overriden - it will be removed.
... but later in a separate pass, so you are right.
Similar implementation to TimelineTickDisplay.
Remaining overhead comes from the bottom part, but that's for another pr.
Map examples:
https://osu.ppy.sh/beatmapsets/982020
https://osu.ppy.sh/beatmapsets/1238185#mania/2574372