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

Poor QTest::addRow() and QTest::newRow() performance in Qt >= 6.5.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7
    • 6.5.0, 6.6.0
    • Testing: qtestlib
    • None
    • All
    • 3
    • 8a23e3aa3 (dev), f7f5477ec (6.7)
    • Foundations Sprint 95, Foundations Sprint 96, Foundations Sprint 97, Foundations Sprint 98, Foundations Sprint 99

    Description

      With Qt >= 6.5.0, QTest::addRow() and QTest::newRow() check for duplicated test case tags (or more specifically, the underlying QTestTablePrivate::newData() does the check via QTesttablePrivate::hasRow()).

      This was added in 2d1fd400f and ddde19129 in response to QTBUG-107185.

      However, the repeated searches in dataList become prohibitively expensive with large number of generated test cases.

      For example, I have a test suite that, when built with Qt 5.15.11 on linux, finishes in couple of seconds:

       

      ...
      1: Totals: 385319 passed, 0 failed, 0 skipped, 0 blacklisted, 5066ms

      When the same code is built with Qt 6.6.0, the test times out, while being stuck in the data generation phase.

      The duplication check should implement separate bookkeeping and look-up using a QSet. Either for all scenarios, or at least for ones that involve a large number of test cases (i.e., switch from direct search in dataList to QSet once number of entries exceeds a certain threshold).

      Attachments

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

        Activity

          People

            isak.fyksen Isak Fyksen
            rok.mandeljc Rok Mandeljc
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes