Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26327

Parsing C/C++ Files is usually *very* slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 5.0.0, Qt Creator 5.0.1
    • C/C++/Obj-C++ Support
    • None
    • Windows 10, VS 2017 through VS 2022.
    • Windows

    Description

      When using Qt Creator to develop our large application (5+ million loc, built with qmake), the "Parsing C/C++ Files" process often, but not always, takes a very long time. During that time, Creator is essentially unusable because every key press, button click, etc. takes several seconds to be processed.

      I see this using kits for Qt 5.12, 5.15, and 6.2 (these are the only ones I've tried). I also have tried VS 2017, VS 2019, and VS 2022 and that doesn't seem to change anything.

      If I start Creator and then open a session in which my project is open, the parsing phase takes about a one minute. If I change to a different configuration (eg. Debug->Release or Qt 5.15->Qt 5.12), the "Parsing C/C++ Files" notification comes up in the lower right and it typically takes about 15 minutes to complete. Sometimes I can click the cancel button in that box and that makes the box go away, but doesn't actually make Creator responsive again. Sometimes when I hover over the box the cancel button never appears.

      My computer has a 16 core/32 thread processor and is otherwise a high performing machine. During the time that the parsing is happening, other applications run just fine. So it's not an issue with the computer hardware. I also have 32 GB and there is typically about 1/2 of the memory available.

      My colleagues that use the same project on less powerful machines with 8 cores/16 threads don't report this issue. So I think the underlying problem might have something to do with the number of threads used by the parsing.

      Our application is closed source and so I don't imagine it will be possible for me to submit a testcase that reproduces the problem. You might also need a machine with a 16 core/32 thread processor.

      Are there any suggestions you can give me to either provide diagnostic information or eliminate the problem? Is it possible for me to limit the number of threads in the thread pool that does the parsing? What might be different about the first parsing attempt from the subsequent attempts that would make the first one go so much faster?

      FWIW, I have been seeing this behavior for a while now. I know I saw it in QtC 4.15 but I think it was also an issue for several previous versions.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            aclight Adam Light
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes