Skip to content

CollectionView2 (CollectionViewHandler2) much more slow than CV1 on updating columns count at runtime #31071

@alexpetin

Description

@alexpetin

Description

  1. IsGrouped / ItemsSource update at runtime does not update CV to grouped mode;
  2. Changing grid layout columns count at runtime is dramatically slow - up to minutes. It requires ~10-15ms when CollectionViewHandler1 is in use.

Steps to Reproduce

  1. Start the repro app, tap "Ungrouped ColView" and "Grouped CollView" buttons several times, note - group headers appeared when needed;
  2. Switch beetwen 4 and 6 columns mode several times, note - it requires ~10-15ms only to CV update on each switch;
  3. Uncomment CollectionViewHandler2 registration at MauiProgram.cs and rerun the app;
  4. Repeat step 1, note - CV does not updated to group mode on ItemsSource and IsGrouped props change at runtime (but it start work once columns count changed);
  5. Repeat step 2, note - it requires more and more time to switch columns count, each next switch requires more time - 0.9s, 1.5s, 3.5s, 6.2s, 14.5s, 25.4s, 61.7s(!) and so on at the my dev environment.

Link to public reproduction project repository

https://github.com/alexpetin/TestCollViewPerf

Version with bug

9.0.90 SR9

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

Any version

Did you find any workaround?

No.

Relevant log output

Metadata

Metadata

Assignees

Labels

area-controls-collectionviewCollectionView, CarouselView, IndicatorViewcollectionview-cv2i/regressionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.platform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions