REPOST:非常长的链接时间 [英] REPOST: extremely long link times

查看:54
本文介绍了REPOST:非常长的链接时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




很抱歉重新发布,但这种情况正在恶化,并且给我带来了很多浪费的时间。我有一个相当大的混合C ++项目,并且在

数量的构建(但不是常数)之后链接(有时候是b / b
编译)变得极其缓慢,任务管理器显示link.exe(或

cl.exe)几乎没有使用任何处理器时间,但是内存很多(大约

150-200MB) 。我要密切关注页面错误,因为我无法想到

其他任何可能造成这种情况的机器 - 机器似乎不是

颠簸并在建设过程中反应敏捷。任何人都可以推荐

什么?


谢谢,


史蒂夫

解决方案




1.不,这就是问题的关联 - 编译'一般非常

快。在任何情况下,它都没有达到处理器的最大值所以

并不是工作量减慢了它。


2.它只是重新编译最小但增量链接显然

在/ clr下不起作用。


3.我现在想知道它是否会最好将所有内容分成

单独的DLL,但我不想因为几个原因。此外,令我困惑的是为什么连接器似乎坐在它的手上,分钟或两分钟,而不需要做任何工作。


干杯,


史蒂夫


" Fireangel" <网络连接******* @ discussions.microsoft.com>在留言中写道

新闻:4F ********************************** @ microsof t.com ...


我是C ++之类的新手,所以可以随意忽略......

一些问题/评论:

1.你是否正在使用很多#Define(或类似的东西。不记得
他们实际上叫什么)?我已经厌倦了黑客攻击

somebodies旧代码有很多这样的东西,并编译它花了

接近4分钟。我继续尽可能多地拿出来(没有杀死

应用程序),这是一个显着的变化。
2.你可能要考虑使用选项 ;启用最小重建项目配置属性下的
- > C / C ++ - >代码生成。

如果设置为YES,编译器将仅为那些

已更改的文件创建新的OBJ。它将保留旧的OBJ然后链接它们。如果你只在
之间更改1个文件,则只会重新创建1个OBJ(而不是全部)。

我认为(不确定),但任何包含你改变的文件(使用

#include)可能需要重新编译......
3.如果你只是测试/调试,为什么不做你的临时dll'
代码的任何部分是完成的或不被检查。例如,我的
有一个Map.dll,它包含了我与地理地图相关的所有东西。我

然后把它作为一个referance,使用#using,并且那些东西永远不会被编译好。然后我创建一个包括所有包含所有代码文件的项目

。这确实让我在整个地方都有很多测试项目,

但测试它确实能让它变得相当快。

不能想到别的什么。让我知道这是否有帮助...

GE

Steve McLellan写道:



很抱歉重新发布,但这变得更加恶化,给我带来了很多浪费时间的
。我有一个相当大的混合C ++项目,并且经过多次构建(但不是常数)链接(有时候编译)变得极其缓慢,并且任务管理器显示该链接。 exe
(或cl.exe)几乎没有使用任何处理器时间,但是大量的RAM
(大约150-200MB)。我要密切关注页面错误,因为我不能认为
可能导致这种情况发生的任何其他事情 - 机器似乎没有b $ b b捶打并且响应相当快在建设期间。任何人都可以推荐
任何东西吗?

谢谢,

史蒂夫



你好史蒂夫,


我过去曾遇到过建筑速度问题。通常结果不是工具,而是环境。


你是建立在映射或替代驱动器上的吗? />
你在运行杀毒软件吗?


只是在黑暗中刺伤......祝你好运。


Steve McLellan写道:



1.不,并且它正在联系那个问题 - 编译'一般非常好
快速。在任何情况下,它都没有达到最接近处理器的程度,因此工作量不会减慢它的速度。

2.它只是重新编译最小但是增量链接显然
不会在/ clr下工作。

3.我现在想知道将所有内容分成单独的DLL是否会更好,但我不知道出于几个原因,我不想这样做。此外,令我困惑的是为什么链接器似乎坐在它的手上一两分钟,而不是似乎做任何工作。

干杯,

史蒂夫

Fireangel <网络连接******* @ discussions.microsoft.com>在消息中写道
新闻:4F ********************************** @ microsof t.com。 ..

我是C ++之类的新手,所以可以随意忽略......

一些问题/意见:

1。你在使用很多#Define(或类似的东西。不记得



他们实际上叫什么)?我已经厌倦了黑客攻击某些有很多这种东西的旧代码,编译它需要接近4分钟。我继续尽可能多地拿出来(没有杀死应用程序),这是一个值得注意的变化。

2。您可能需要考虑在项目配置属性 - >下使用选项启用最小重建


。 C / C ++ - >代码生成。
如果设置为YES,编译器将仅为那些已更改的文件创建新的OBJ。它将保留旧的OBJ然后链接它们。如果你只更改1个文件,只会重新创建1个OBJ(而不是全部)。
我认为(不确定),但包含你更改的文件的任何文件(使用
#include)可能需要重新编译......

3。如果您只是测试/调试,为什么不为

创建临时dll?


任何完成代码的部分或不被检查。例如,我有一个Map.dll,其中包含与地理地图相关的所有内容。然后我把它作为一个referance,使用#using,并且那些东西永远不会被编译。然后我创建一个包括所有其中包含所有代码文件的项目。这确实给我带来了很多测试项目,但测试它确实让它变得相当快。


无法想象其他任何事情。让我知道这是否有帮助...

GE

Steve McLellan写道:



抱歉重新发布,但这种情况正在恶化,并且给我带来了很多浪费时间。我有一个相当大的混合C ++项目,并且经过多次构建(但不是常数)链接(有时候编译)变得极其缓慢,并且任务管理器显示该链接。 exe
(或
cl.exe)几乎没有使用任何处理器时间,但是内存很多(
150-200MB)。我要密切关注页面错误,因为我无法想到

任何其他可能导致这种情况的机器 - 机器似乎不会<在建筑过程中,颠簸和反应相当迅速。任何人都可以推荐
任何东西吗?

谢谢,

史蒂夫




史蒂夫:


有些MS应用程序试图访问互联网,无论是否有


需要找到的任何东西。其中一个办公室应用程序停止运行,直到发生TCP

超时(启动前1-2分钟)。


另外,我发现我必须定期清除IE6浏览器历史记录

,如果我在桌面上有任何URL快捷方式引用FTP站点,我必须

删除那些

,或者一段时间后所有文件菜单都会停止约2分钟。


- Tom



" Steve McLellan" < sjm.NOSPAM AT fixerlabs DOT com>在消息中写道

news:eZ ************** @ TK2MSFTNGP12.phx.gbl ...


1.没有,这就是问题的关联 - 编译'一般非常快。在任何情况下,它都没有达到最接近处理器的程度,因此工作量不会减慢它的速度。

2.它只是重新编译最小但是增量链接显然
不会在/ clr下工作。

3.我现在想知道将所有内容分成单独的DLL是否会更好,但我不知道出于几个原因,我不想这样做。此外,令我困惑的是为什么链接器似乎坐在它的手上一两分钟,而不是似乎做任何工作。

干杯,

史蒂夫

Fireangel <网络连接******* @ discussions.microsoft.com>在消息中写道
新闻:4F ********************************** @ microsof t.com。 ..


我是C ++之类的新手,所以可以随意忽略......

一些问题/评论:
1.你是否正在使用很多#Define(或类似的东西。难道不能
记住

他们实际上叫什么)?我已经厌倦了黑客攻击某些有很多这种东西的旧代码,编译它需要接近4分钟。我继续尽可能多地拿出来(没有杀死应用程序),这是一个值得注意的变化。


2.你可能要考虑使用选项启用最小重建在项目配置属性下 - > C / C ++ - >代码生成。
如果设置为YES,编译器将仅为那些已更改的文件创建新的OBJ。它将保留旧的OBJ然后链接它们。如果你只更改1个文件,只会重新创建1个OBJ(而不是全部)。
我认为(不确定),但包含你更改的文件的任何文件(使用
#include)可能需要重新编译...


3.如果你只是测试/调试,为什么不做温度dll''s



代码的任何部分完成或不被检查。例如,我有一个Map.dll,其中包含与地理地图相关的所有内容。
然后我把它作为一个referance,使用#using,并且那些东西永远不会被编译。然后我创建一个包括所有包含所有代码
文件的项目。这确实给我留下了很多测试项目,但是为了测试它确实能让它变得相当快。



无法想象其他任何事情。让我知道这是否有帮助...

GE

Steve McLellan写道:



很抱歉重新发布,但这变得更加恶化,导致我
很多


a之后构建(但不是常数)链接(有时候编译)变得极其缓慢,并且任务管理器显示
link.exe

(或cl.exe)几乎没有使用任何处理器时间,但是有大量的RAM(大约150-200MB)。我要密切注意页面错误,因为我不能


认为

其他任何可能造成这种情况的机器 - 机器不会似乎是颠簸,并在建设过程中相当敏感。任何人



推荐什么?

谢谢,

史蒂夫




Hi,

Sorry to repost, but this is becoming aggravating, and causing me a lot of
wasted time. I''ve got a reasonably large mixed C++ project, and after a
number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe (or
cl.exe) is barely using any processor time, but an awful lot of RAM (around
150-200MB). I''m going to keep an eye on page faults since I can''t think of
anything else that could be causing this - the machine doesn''t seem to be
thrashing and is fairly responsive during building. Can anyone recommend
anything?

Thanks,

Steve

解决方案

Hi,

1. Nope, and it''s linking that''s the problem - compiling''s generally very
fast. In any case, it''s not getting anywhere near maxing the processor so
it''s not the workload slowing it down.

2. It is only recompiling the minimum but incremental linking apparently
doesn''t work under /clr.

3. I am now wondering whether it''d be better to split everything up into
separate DLLs, but I don''t want to for a couple of reasons. And besides,
what puzzles me is why the linker seems to be sitting on its hands for a
minute or two, without seeming to do any work.

Cheers,

Steve

"Fireangel" <Fi*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...


I''m a fairly newbie to C++ and the like, so feel free to ignore...

Some questions / comments:

1. Are you using alot of #Define (or anything like that. Can''t remember what they are actually called)?? I''ve had the displeasure of hacking
somebodies old code that had ALOT of this stuff, and to compile it took
close to 4 min. I went ahead and took out as much as I could (W/o killing
the app), and it was a noticable change.
2. You may want to consider using the option "Enable Minimal Rebuild" under the projects configureation properties -> C/C++ -> Code Generation.
If set to YES, the compiler will only create new OBJ for those files that
have changed. It will keep the old OBJs and then link them. If you only
change 1 file between, only 1 OBJ will be recreated (instead of them all).
I think (not sure), but any files that include the file you change (Using
#include) may have to be recompiled...
3. If you''re just testing / debugging, why don''t you make temp dll''s for any part of the code that is "Done" or not being checked. For instance, I
have a Map.dll that containes all my stuff related to geographical maps. I
then include it as a referance, use #using, and that stuff never gets
compiled. I then create a "include all" project that has all the code files
in it. This does leave me with a lot of Test projects all over the place,
but to test it does make it fairly fast.

Can''t think of anything else. Let me know if this helps...
GE

"Steve McLellan" wrote:

Hi,

Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I''ve got a reasonably large mixed C++ project, and after a
number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe (or cl.exe) is barely using any processor time, but an awful lot of RAM (around 150-200MB). I''m going to keep an eye on page faults since I can''t think of anything else that could be causing this - the machine doesn''t seem to be thrashing and is fairly responsive during building. Can anyone recommend
anything?

Thanks,

Steve



Hi Steve,

I''ve had building speed issues in the past. Usually turns out not to be
the tools, but the environment.

are you building on or to a mapped or subst''d drive?
are you running anti-virus software?

Just a stab in the dark.... good luck.

Steve McLellan wrote:

Hi,

1. Nope, and it''s linking that''s the problem - compiling''s generally very
fast. In any case, it''s not getting anywhere near maxing the processor so
it''s not the workload slowing it down.

2. It is only recompiling the minimum but incremental linking apparently
doesn''t work under /clr.

3. I am now wondering whether it''d be better to split everything up into
separate DLLs, but I don''t want to for a couple of reasons. And besides,
what puzzles me is why the linker seems to be sitting on its hands for a
minute or two, without seeming to do any work.

Cheers,

Steve

"Fireangel" <Fi*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...

I''m a fairly newbie to C++ and the like, so feel free to ignore...

Some questions / comments:

1. Are you using alot of #Define (or anything like that. Can''t remember



what they are actually called)?? I''ve had the displeasure of hacking
somebodies old code that had ALOT of this stuff, and to compile it took
close to 4 min. I went ahead and took out as much as I could (W/o killing
the app), and it was a noticable change.

2. You may want to consider using the option "Enable Minimal Rebuild"



under the projects configureation properties -> C/C++ -> Code Generation.
If set to YES, the compiler will only create new OBJ for those files that
have changed. It will keep the old OBJs and then link them. If you only
change 1 file between, only 1 OBJ will be recreated (instead of them all).
I think (not sure), but any files that include the file you change (Using
#include) may have to be recompiled...

3. If you''re just testing / debugging, why don''t you make temp dll''s for



any part of the code that is "Done" or not being checked. For instance, I
have a Map.dll that containes all my stuff related to geographical maps. I
then include it as a referance, use #using, and that stuff never gets
compiled. I then create a "include all" project that has all the code files
in it. This does leave me with a lot of Test projects all over the place,
but to test it does make it fairly fast.


Can''t think of anything else. Let me know if this helps...
GE

"Steve McLellan" wrote:

Hi,

Sorry to repost, but this is becoming aggravating, and causing me a lot
of
wasted time. I''ve got a reasonably large mixed C++ project, and after a
number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe
(or
cl.exe) is barely using any processor time, but an awful lot of RAM
(around
150-200MB). I''m going to keep an eye on page faults since I can''t think
of
anything else that could be causing this - the machine doesn''t seem to
be
thrashing and is fairly responsive during building. Can anyone recommend
anything?

Thanks,

Steve




Steve:

Some of the MS applications try to access the Internet whether or not
there is
anything that needs to be found. One of the office applications stalls until
the TCP
time-out occurs (1-2 minutes before starting).

Additionally, I found I have to clear the IE6 browser history
periodically, and if I
have any URL shortcuts on the desktop that refer to an FTP site, I have to
remove those
as well, or after awhile all file menus stall for about 2 minutes.

-- Tom


"Steve McLellan" <sjm.NOSPAM AT fixerlabs DOT com> wrote in message
news:eZ**************@TK2MSFTNGP12.phx.gbl...

Hi,

1. Nope, and it''s linking that''s the problem - compiling''s generally very
fast. In any case, it''s not getting anywhere near maxing the processor so
it''s not the workload slowing it down.

2. It is only recompiling the minimum but incremental linking apparently
doesn''t work under /clr.

3. I am now wondering whether it''d be better to split everything up into
separate DLLs, but I don''t want to for a couple of reasons. And besides,
what puzzles me is why the linker seems to be sitting on its hands for a
minute or two, without seeming to do any work.

Cheers,

Steve

"Fireangel" <Fi*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...


I''m a fairly newbie to C++ and the like, so feel free to ignore...

Some questions / comments:

1. Are you using alot of #Define (or anything like that. Can''t remember

what they are actually called)?? I''ve had the displeasure of hacking
somebodies old code that had ALOT of this stuff, and to compile it took
close to 4 min. I went ahead and took out as much as I could (W/o killing
the app), and it was a noticable change.


2. You may want to consider using the option "Enable Minimal Rebuild" under the projects configureation properties -> C/C++ -> Code Generation.
If set to YES, the compiler will only create new OBJ for those files that
have changed. It will keep the old OBJs and then link them. If you only
change 1 file between, only 1 OBJ will be recreated (instead of them all).
I think (not sure), but any files that include the file you change (Using
#include) may have to be recompiled...


3. If you''re just testing / debugging, why don''t you make temp dll''s


for any part of the code that is "Done" or not being checked. For instance, I
have a Map.dll that containes all my stuff related to geographical maps. I then include it as a referance, use #using, and that stuff never gets
compiled. I then create a "include all" project that has all the code files in it. This does leave me with a lot of Test projects all over the place,
but to test it does make it fairly fast.



Can''t think of anything else. Let me know if this helps...
GE

"Steve McLellan" wrote:

Hi,

Sorry to repost, but this is becoming aggravating, and causing me a lot

of wasted time. I''ve got a reasonably large mixed C++ project, and after

a number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe

(or cl.exe) is barely using any processor time, but an awful lot of RAM (around 150-200MB). I''m going to keep an eye on page faults since I can''t

think

of anything else that could be causing this - the machine doesn''t seem to be thrashing and is fairly responsive during building. Can anyone


recommend anything?

Thanks,

Steve




这篇关于REPOST:非常长的链接时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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