什么使这个头文件慢VS2005抓取? (智能感知免费?) [英] What makes this header file slow VS2005 to a crawl? (IntelliSense exonerated?)

查看:186
本文介绍了什么使这个头文件慢VS2005抓取? (智能感知免费?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用我在这里找到的编译时间散列技术,尝试使用C ++项目 。宏工作正常,编译时间是合理的,但是64个递归宏似乎在使用Visual Studio的Intellisense。每次短暂编辑后,IDE将挂起约30秒。我怀疑它正在卷起试图解析嵌套的宏。一旦我删除 #includeconsthashmacro.h 行,响应性就会恢复正常。



方法来禁用特定头文件的Intellisense?



我发现这篇文章标题为通过宏控制智能感知,但是那里的解决方案似乎没有正确地为我工作。



也许这不是intelliSense?它绝对与那个标题相关。任何想法?





我尝试通过重命名feacp.dll为推荐我得到相同的行为 - 编辑导致IDE挂起很长时间删除头恢复性能

重现

使用Visual Studio 2005,创建一个新的Win32控制台应用程序与默认设置(即:使用预编译头)。将以下代码添加到cpp文件。 (将consthashmacro.h解压缩到源目录中(可从 zip文件< a>在Chris Savoie的网站)

  #includestdafx.h

#define CONSTHASH s)(s)[0]
//#includeconsthashmacro.h

void发送(长散列,长值)
{
printf (Sending%x%x \\\
,hash,value);
}

#define QQuot_(x)#x
#define QQuote x)
#define Debug_Print(s,v)(Send(CONSTHASH(QQuote(__ LINE __)## s),*((long *)&(v))))
int _tmain argc,_TCHAR * argv [])
{
int i = __LINE__;
float f = 3.14f;
Debug_Print(This is a test%d,i);

i ++;
Debug_Print(This is a test%d,i);
Debug_Print(This was test%f,f);

return 0;
}

当我替换

解决方案

我是在纠正一些被挂在宏的递归宏,但它不是IntelliSense。罪魁祸首原来是免费版的重构!对于我安装了很久以前(很少使用)的DevExpress中的C ++。



当我卸载它时,IDE性能恢复正常。我重新启用IntelliSense,它的工作原理没有问题。



我想对IntelliSense提供正式的道歉:我很遗憾我对你施加不公平的骚扰。


I was experimenting with a C++ project using the Compile Time Hashing technique I found here. The macros work as expected, and the compile time is reasonable, but the 64 recursive macros seem to being playing hell with Visual Studio's Intellisense. After every short edit, the IDE hangs for ~30 seconds. I suspect that it is getting wound up trying to parse the nested macros. As soon as I remove the #include "consthashmacro.h line, responsiveness returns to normal.

Is there a way to disable Intellisense for a specific header file?

I've found this article titled "Controlling IntelliSense Through Macros", but the solution there does not seem to be working correctly for me either.

Perhaps it's not intelliSense? It's definitely related to that header. Any ideas?

EDIT:
I tried disabling Intellisense entirely by renaming the feacp.dll as recommended. I get the same behavior - edits cause the IDE to hang for long periods. Removing the header restores performance. What other feature of VS2055 could be causing this incredible lag?

To Reproduce:
Using Visual Studio 2005, Create a new "Win32 Console Application" with the default settings (i.e: using precompiled headers). Add the following code to the cpp file. (Extract 'consthashmacro.h' into the source directory (available from the zip file at Chris Savoie's site)

#include "stdafx.h"

#define CONSTHASH(s) ((s)[0])
//#include "consthashmacro.h"

void Send(long hash, long value)
{
   printf("Sending %x %x\n", hash, value);
}

#define QQuot_(x) #x
#define QQuote(x) QQuot_(x)
#define Debug_Print(s, v) (Send( CONSTHASH(QQuote(__LINE__)##s), *((long*)&(v))))
int _tmain(int argc, _TCHAR* argv[])
{
       int i = __LINE__;
       float f= 3.14f;
       Debug_Print("This is a test %d", i);

       i++;
       Debug_Print("This is a test %d", i);
       Debug_Print("This was test %f", f);

    return 0;
}

When I replace the #define CONSTHASH with the include line underneath it, performance slows to a crawl.

解决方案

I was correct that something was getting hung up on the recursive macros, but it wasn't IntelliSense. The culprit turned out to be the free version of Refactor! for C++ from DevExpress that I had installed a long while ago (and rarely used).

When I uninstalled that, IDE performance returned to normal. I re-enabled IntelliSense, and it works with no problems.

I would like to offer a formal apology to IntelliSense: I regret that I cast unfair aspersions upon you.

这篇关于什么使这个头文件慢VS2005抓取? (智能感知免费?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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