Closed elachlan closed 1 month ago
@Olina-Zhang can your team please test this?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.26543%. Comparing base (
0aa3a4d
) to head (e2da404
).
Hi @elachlan, tested before and after this PR change, I didn't see any behavior difference when updating one ListViewSubItem's Text property, noticed entire row is blinking once(The recorded video doesn't seem to show it), is it the issue? Not sure if I understand the client's question correctly.
https://github.com/dotnet/winforms/assets/26474449/72f65fe2-7e5f-4a5e-97bf-d40396ffa6e6
Hi @Olina-Zhang, That is fantastic. There shouldn't be any behavior changes.
The issue will arise if there is a large number of sub items (1000) it will be very slow to update. After the change it should be very quick.
That's because my test was a bit small, I'll try a bigger one.
If ListView has a large number of sub items (>1000), updating the text of ListViewSubItem is also quite fast with before and after your PR change, looks like no difference.
https://github.com/dotnet/winforms/assets/26474449/e21f1014-a2e0-4b6f-be9d-c13b2d72a044
Verified this issue on 9.0.100-preview.5.24273.4 with dlls built from winforms repo of main branch, the result is same as above which Olina did.
https://github.com/dotnet/winforms/assets/45864985/1586d2ba-6809-4396-9d24-542d1097ac79
Verified this issue with 9.0.100-preview.5.24304.3 test pass build, it was fixed. Test result is same as above.
Fixes #10963
Change
ListViewSubItem.Text
to pass index toListViewItem.UpdateSubItems
to avoid loop.Microsoft Reviewers: Open in CodeFlow