Skip to content
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

[WinUI] CollectionVIew scrolling performance #18510

Closed
PureWeen opened this issue Nov 3, 2023 · 2 comments
Closed

[WinUI] CollectionVIew scrolling performance #18510

PureWeen opened this issue Nov 3, 2023 · 2 comments
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟
Milestone

Comments

@PureWeen
Copy link
Member

PureWeen commented Nov 3, 2023

Description

Given the following layout

<ContentPage>
     <CollectionView x:Name="cvGrid" Background="Yellow" HorizontalOptions="Fill"
                             BackgroundColor="Black">
		<CollectionView.ItemTemplate>
			<DataTemplate>
				<Grid BackgroundColor="Purple" ColumnDefinitions="25,25,25,25,25,25,25,25,25,25,25">
					<Label Grid.Column="0" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="1" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="2" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="3" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="4" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="5" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="6" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="7" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="8" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="9" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="10" TextColor="White" Text="{Binding Symbol}"></Label>
					<Label Grid.Column="11" TextColor="White" Text="{Binding Symbol}"></Label>
				</Grid>
			</DataTemplate>
		</CollectionView.ItemTemplate>
	</CollectionView>
</ContentPage>

the performance on XF is much better than MAUI

Steps to Reproduce

The performance between XF and MAUI is close here. The main lag seems to be from updating the layouts/bindings.

If you scroll really fast hon MAUI the fields just take a moment to update.
XF also isn't perfect here, it flashes weirdly and the layout is incorrect.

MAUI:
MauiCV.zip

XF:
XFCVUWP.zip

Link to public reproduction project repository

No response

Version with bug

8.0.0-rc.2.9373

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

The behavior on .NET8 is much better than it was in .NET7

Affected platforms

Windows

Affected platform versions

Windows

Did you find any workaround?

No response

Relevant log output

No response

@PureWeen PureWeen added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Nov 3, 2023
@PureWeen PureWeen added this to the .NET 8 SR2 milestone Nov 3, 2023
@PureWeen PureWeen modified the milestones: .NET 8 SR2, .NET 8 SR1 Nov 3, 2023
@Foda Foda self-assigned this Nov 3, 2023
@Eilon Eilon added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Nov 6, 2023
@mjsb212
Copy link

mjsb212 commented Nov 10, 2023

There is also a specific issue with CollectionView on Android with Scrolling and Grid Layouts: #17326 - Anyone know if the issues are related??

@Foda
Copy link
Member

Foda commented Nov 10, 2023

Isolated WinUI app reproducing the behavior: https://github.com/Foda/ListViewVirtualization

@PureWeen PureWeen moved this from Todo to In Progress in MAUI SDK Ongoing Nov 13, 2023
@PureWeen PureWeen modified the milestones: .NET 8 SR1, .NET 8 SR2 Nov 22, 2023
@Foda Foda closed this as completed Dec 5, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Dec 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟
Projects
None yet
Development

No branches or pull requests

5 participants