问题
Even in simple applications (as simple as QWidgets app made from wizard) qtcreator.exe spikes to 50% (1 core) every other time when editing code. Seems like it parses the whole project even after several new characters where typed in, making it unresponsive and to some point unusable.
This gets worse with project size, so after adding several cpp/h modules with a dozen of classes it makes people nervous.
The same project works flawlessly in Qt under debian, su I suppose it's connected to WinXP_x86. Can't check whether it exhibits the same behaviour under Win7.
Is it the usual case (I don't see any complaints about it over the web so I suppose it's not), can it be fixed completely or can code parsing be switched to "parse on save" or something like it?
update: Qt Creator running on Win7 doesn't show such behaviour either, so it's definitely WinXP-related problem
回答1:
Removing Options -> C++ -> Code model -> Ignore pre-compiled headers
option (this is set by default) seems to fix the issue - code completion and parsing is smooth now. I don't use PCHs in my projects explicitly, so don't know whether it influences its supposed aim to improve performance.
来源:https://stackoverflow.com/questions/27274409/qt-creator-high-cpu-usage-in-editor