Browse mode: Elements List dialog: Delay applying filter for smoother response#10308
Conversation
Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>
|
@feerrenrut here also, even more than for #10307, the retrieval of the filtered items is much slower than their drawing. |
I think we should see how successful using the virtual tree control is. I expect we will need a mixture of these approaches. Tuning this delay time is going to be difficult, it will likely have a different optimal value on different computers. A third approach might be to do the list filtering in another (cancelable) thread. Restarting the work each time the filter gets updated. |
|
@feerrenrut, After a lot of tweaks, it is slightly more efficient, but still not fully satisfying even on my race-horse development workstation. Thus, I would suggest either:
|
Thanks for trying that out!
A surprising result, do you cancel this thread when typing resumes?
Yes, if none of these other options seem promising, we can certainly accept this approach. |
Just looked at the branch, it seems you do. Though I'm concerned about accessing the gui from this other thread. I have commented on the commit. |
It depends on which operations and which controls. Remember that the only real problem here (especially with VirtualTree) is expanding the categories. For a regular wxPython application, I'd just expand the categories one by one in the wx main thread, call Would you prefer to keep the current PR as is, or that I cancel this one and file instead the Virtual Tree + delay timer? (Given that the separate thread version seems really not a viable option here.) |
If that's the case, perhaps do the filtering of categories that contain items that match to give an indication that filtering is working and only expand the categories after 300ms of no typing? |
Sounds worth trying. I'll test this approach on the VirtualTree branch and let you know. |
It seems our conversations got a little mixed up between this PR and #10307 @JulienCochuyt can you confirm this PR is ready? I thought this would also be converted to a virtual tree? |
|
@feerrenrut wrote:
Indeed.
It already improves the situation as is. |
|
I'm not entirely confident with this change. I might increasing this timeout doesn't have the effect that I would expect. I think I will need to look into it more. |
|
@seanbudd, I can see that you have just added the new stale label.
Thanks. |
|
@CyrilleB79 - I have added the following description: "PR is stale/old - NV Access has missed reviewing this or this is an abandoned draft". Stale does not indicate merge conflicts or that it is blocked, we have separate labels for those 2 conditions. |
seanbudd
left a comment
There was a problem hiding this comment.
I've tested this behaviour and it seems like an improvement to me.
When changing the filter text the filtered list is more responsive, as the timer is reset each time the text is changed.
I think Reef may have been concerned about the fact that when loading the filter, the list is visually built in front of the user, instead of becoming visible once all entries are loaded.
Link to issue number:
Related to #7197, but does not solve it.
Summary of the issue:
In browse mode, in the Elements List dialog, speed typing a filter string leads to slow responsiveness from the UI and NVDA itself.
Description of how this pull request fixes the issue:
lightly delay the refresh of the elements list by 300 ms. (same technique as PR #10307)
Testing performed:
Known issues with pull request:
Change log entry:
I'm not sure this deserves to be announced.
Otherwise:
Section: Bug fixes
In browse mode, in the Elements List dialog, speed typing a filter string now longer makes NVDA lag.