On Tue, Feb 16, 2021 at 7:12 AM Alexander Dyagilev <alervd...@gmail.com> wrote:
> I always appears after i had to restart Qt Creator. > > I had to restrt it due to the following reasons: > > 1) It stops parsing c++ code for opened files so i can't use IDE's C++ > support > > 2) > > ... > > I can't think of another reason. It's always 1st one. > > I see this all the time on Windows with our application's project (hundreds of files, several million lines of code, likely very poorly organized with regards to headers). When the "Parsing C/C++ Files" step starts (eg. after switching between debug and release configurations), it typically takes 10+ minutes (if it even finishes at all), and I think the message you described will show up if I kill Creator while it's parsing C/C++ files. For reference, a complete build of our project from scratch takes about 2 minutes on the same machine, so clearly the files can be parsed much more quickly by the actual compiler. My machine has 16 cores/32 threads. If I collect ETW data while Creator is parsing files, the parsing is happening in around 20 threads but the total CPU utilization during the entire time is typically about 5%, suggesting that there may be a lot of thread contention. If I dive deeper into the traces, for a 21.4 s sampling period (which represents 25.1 s of qtcreator.exe CPU time), 18.2 seconds of CPU time are spent in either RtlpAllocateHeap or RtlpHeapFindListLookupEntry. These are Windows API functions that are indirectly called by QVector::realloc. In this case, most of that is due to <CPlusPlus::Internal::PPToken>::realloc. Note that this 21.4 s sampling period is just a small part of the ~10 minutes it took to complete the Parsing C/C++ Files step. My guess is that Creator's CppTools and CPlusPlus plugins are not able to efficiently handle deep #include trees. For what it's worth, our project uses precompiled headers and in Creator's Code Model settings tab, "Ignore precompiled headers" is unchecked. I can't provide our project since our application is not open source. If there is any sort of debugging mode I can enable that might shed more light on what is happening I'm happy to help there. Adam
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest