Qt creator high cpu usage in editor

房东的猫 提交于 2020-01-14 13:48:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!