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

[6.5->6.7 regression] QString::replace() takes huge amount of time. 10x worse performance

    XMLWordPrintable

Details

    • All
    • 315210de9 (dev), 1f3e8c316 (6.8), ba1ffacfe (6.7), 2ce08e367 (dev), 225e235cf (6.8)

    Description

      QString xmlMessageRawContents(const QDomElement& msg_element) const {
        QString raw_contents;
        QTextStream str(&raw_contents);
      
        msg_element.save(str, 0, QDomNode::EncodingPolicy::EncodingFromTextStream);
        return raw_contents;
      }
      

      Let's have this XML (RSS feed actually)

      https://blog.digital-forensics.it/feeds/posts/default?alt=rss

      Fetch the XML, load into QDomDocument instance, then select one by one of its "<item>" elements and run with above method with the element as parameter.

      With Qt 5.x, the execution takes like 20 seconds (that itself is really slow but manageable), but with Qt 6.7.2 the execution takes many many seconds -> FOUR MINUTES. The reason is that the above XML has relatively (but not really) huge elements - they contain a lot of text.

      Attachments

        1. default.rss
          7.77 MB
        2. main.cpp
          1 kB
        For Gerrit Dashboard: QTBUG-127549
        # Subject Branch Project Status CR V

        Activity

          People

            peppe Giuseppe D'Angelo
            skunkos Martin Rotter
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes