Why is setFilterFixedString using invalidateFilter instead of invalidate which makes it very very slow?

  • I have to wonder if anybody has used a QTableView with a QSortFilterProxyModel and more than a couple of thousand entries. Its crawling slow on my i7 with 16GB of mem. Not only is the scrolling sluggish, but also the filtering. There is no way this could be used for real-time filtering.
    Using my own filter, I changed invalidateFilter (as shown in the example for QSFPM) to invalidate() and it became much faster. However, there is no way to customize how setFilterFixedString invalidates the model, it uses InvalidateFilter internally.

    Has this never been an issue for anybody else?

    Coming from Java GlazedLists which has amazing filtering speeds I am slightly disappointed here.
    Also the docs do not specify what the difference between invalidateFilter and invalidate is. I assume the first one tries to preserve the current selection, and performs very poorly in that.

  • Lifetime Qt Champion


    Excellent question, since it's a bit low-level, I would recommend you ask it on the development mailing list, you'll find Qt's developer/maintainers there (this forum is more user oriented)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.