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

QTreeWidget sorts unrelated items leading to horrible performance

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • Some future release
    • 4.5.3, 4.6.2
    • Widgets: Itemviews
    • None
    • openSuse 11.2, tested with Qt4.5.3 selfcompiled and 4.6.2 from openSuse

    Description

      I have a QTreeWidget with 5 root nodes. one of this has 35000 subnodes.
      Sorting is enabled.
      When inserting a new node into any other root node (not the one having the large number of children),
      QTreeWidget still tries to sort ALL other nodes again, although the two root nodes are siblings and the sorting will
      never affect their children.
      I check this with the operator< in a derived QTreeWidgetItem and on the first start filling the tree with the 35000 child nodes,
      the operator< is called 174721 times.
      When inserting 1 new child node, the counter in operator< increases already to 349443 !

      This makes the performance of the tree a nightmare.

      With Q3ListView, I did not have this problem, so this is a massive regression compared to this class.

      See attached test program

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            mkoller Martin Koller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes