Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128477

Windows accessibility code makes filtered combobox VERY slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.2
    • None
    • Windows

    Description

      In our program, we have a combobox showing 2000 projects, and it can be filtered to show only current (non-expired) projects or all projects, and to show only development projects or to also include trainings, etc.

      This works just fine on Linux and macOS, but on Windows, the accessibility code gets triggered for all users (WM_GETOBJECT is received even without enabling any accessibility feature), which triggers QAccessibleTable creating persistent model indexes for each and every cell of the underlying model. Those have to be updated for every rowsInserted() emitted by the change of filtering, making the whole thing unbearably slow (the application hangs for a good 4 or 5 minutes - I just noticed the fix for QTBUG-33786 which reduces that to approx 6s by ignoring the other 21 columns in the underlying model - much better but that's still a lot for a single combo).

      Standalone testcase: tst_comboWithLargeModel.cppCMakeLists.txt

      Suggested debug output in Qt to see what's happening: debug_output.diff

      Actual debug output: out.txt

      I'm wondering if this accessibility code really needs to create so many persistent model indexes, they ARE very expensive to maintain.... For instance within QWindowsUiaMainProvider::notifyValueChange we just want to look at the item text right now, not to create the persistent index that child( i ) indirectly creates and stores forever.

      Attachments

        1. CMakeLists.txt
          0.4 kB
        2. debug_output.diff
          4 kB
        3. out.txt
          112 kB
        4. tst_comboWithLargeModel.cpp
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            dfaure_kdab David Faure
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes