Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why is setFilterFixedString using invalidateFilter instead of invalidate which makes it very very slow?

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    philk
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved