-
Notifications
You must be signed in to change notification settings - Fork 949
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
Improve ListViewSubItem.Text
performance
#11401
Conversation
…iewItem.UpdateSubItems to avoid loop
@Olina-Zhang can your team please test this? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11401 +/- ##
===================================================
+ Coverage 74.26256% 74.26543% +0.00287%
===================================================
Files 3025 3025
Lines 626861 626861
Branches 46742 46742
===================================================
+ Hits 465523 465541 +18
+ Misses 157993 157977 -16
+ Partials 3345 3343 -2
Flags with carried forward coverage won't be shown. Click here to find out more. |
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. ListViewSubItem.sText.mp4 |
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. LargeListViewSubItem.sText.mp4 |
…stViewItem.UpdateSubItems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks reasonable. Probably updating text for all subitems was an oversight in the original implementation.
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. 11401-testresult.mp4 |
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