Improve performance with large numbers of panels visible

This commit is contained in:
Dean Herbert
2017-12-17 04:30:56 +09:00
parent c02ce16f47
commit 5d7413f19c
3 changed files with 16 additions and 3 deletions

View File

@ -483,11 +483,11 @@ namespace osu.Game.Screens.Select
{
DrawableCarouselItem item = Items[i];
if (!item.Item.Visible) continue;
// Only add if we're not already part of the content.
if (!scrollableContent.Contains(item))
{
if (!item.Item.Visible) continue;
// Makes sure headers are always _below_ items,
// and depth flows downward.
item.Depth = i + (item is DrawableCarouselBeatmapSet ? -Items.Count : 0);