Skip to content

ItemsRepeater extremely slow #20

@Leon99

Description

@Leon99

Describe the bug
Even with ~20 items, ItemsRepeater takes a few seconds to scroll.

To Reproduce

    <DockPanel>
        <TextBox
            Name="SearchTextBox"
            Margin="15,5,15,10"
            Classes="clearButton"
            DockPanel.Dock="Top"
            Text="{Binding SearchTerm}"
            Watermark="Filter" />
        <ScrollViewer Padding="15,0">
            <ItemsRepeater ItemsSource="{Binding Types}">
                <ItemsRepeater.ItemTemplate>
                    <DataTemplate DataType="model:TypeExtract">
                        <controls:SettingsExpander
                            Margin="0,1"
                            Description="{Binding Namespace}"
                            Header="{Binding Name}" />
                    </DataTemplate>
                </ItemsRepeater.ItemTemplate>
            </ItemsRepeater>
        </ScrollViewer>
    </DockPanel>

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 11.0.1

Additional context
Debug output constantly shows

[Layout]Layout cycle detected. Item 'Avalonia.Controls.StackPanel' was enqueued '10' times.(LayoutQueue`1 #12819582)
[Layout]Layout cycle detected. Item 'Avalonia.Controls.TextBlock' was enqueued '10' times.(LayoutQueue`1 #12819582)
[Layout]Layout cycle detected. Item 'Avalonia.Controls.Presenters.ContentPresenter' was enqueued '10' times.(LayoutQueue`1 #12819582)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions