Qt创建者高cpu在编辑器中的用法 [英] Qt creator high cpu usage in editor

查看:171
本文介绍了Qt创建者高cpu在编辑器中的用法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使在简单的应用程序(简单的QWidgets应用程序从向导)qtcreator.exe峰值到50%(1核心)每隔一段时间编辑代码。似乎它解析整个项目,即使在几个新的字符后,输入,使其无响应,并且某些点不可用。

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.

这变得更糟的项目大小,几个cpp / h模块有十几个类,它让人们紧张。

This gets worse with project size, so after adding several cpp/h modules with a dozen of classes it makes people nervous.

同样的项目在debian下的Qt完美无缺,我认为它连接到WinXP_x86。不能检查它是否在Win7下显示相同的行为。

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.

这是通常的情况(我没有看到任何投诉在网络上,所以我想它不是),它可以完全固定,或者可以将代码解析切换到parse on save或类似的东西?

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?

更新:Qt Creator在Win7上运行也不会显示这样的行为,所以它肯定是WinXP相关的问题

update: Qt Creator running on Win7 doesn't show such behaviour either, so it's definitely WinXP-related problem

推荐答案

code>选项 - > C ++ - >代码模型 - >忽略预编译的头文件选项(这是默认设置)似乎解决了问题 - 代码完成和解析现在是平滑的。我没有明确地在我的项目中使用PCH,所以不知道它是否影响其假设的目的,以提高性能。

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.

这篇关于Qt创建者高cpu在编辑器中的用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆