Reduce overhead of ApplyState by tracking previous values

Even with pooling applied, there are overheads involved with transforms
when quickly cycling through the carousel.

The main goal here is to reduce the transforms in cases the reuse is
still in the same state. Avoiding firing `FadeIn` and `FadeOut` are the
main areas of saving.
This commit is contained in:
Dean Herbert
2022-01-30 13:01:41 +09:00
parent a06287e76a
commit c3e3b2019d
2 changed files with 43 additions and 15 deletions

View File

@ -71,6 +71,9 @@ namespace osu.Game.Screens.Select.Carousel
{
beatmapInfo = panel.BeatmapInfo;
Item = panel;
// Difficulty panels should start hidden for a better initial effect.
Hide();
}
[BackgroundDependencyLoader(true)]