Start without Debugging VS start

   相信大家在编译程序的时候,不会去注意Start without Debugging VS start这两个编译的效率有什么不同?

上网看了好多的文章,其中有一个是介绍用到BITMAP的时候,用如上两种运行的效率差的非常的多。原文如下:

Performance drops dramatically for me in VS2005, if I run something in debug-mode. It does not matter, if I compiled a debug version or a release version, just clicking "start debugging" instead of "start without debugging" makes things slow. I found out, that all of my performance problems are related to System.Drawing.Bitmap - it might be a new debugging option concerning interop, but I did not find it.

An example:

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Drawing.Bitmap b = new System.Drawing.Bitmap(1000, 1000);
int bla = 0;
for (int x = 0; x < 1000000; ++x) bla = bla + b.Width;
}
}
}

This takes not even a second when I "start without debugging". It's as fast in VS2003, either with or without debugging. But it takes 10 seconds with debugging in VS2005.
I could actually bypass all debugging performance problems but one: Loading a single texture with managed DirectX (for .Net 1), using a Bitmap object takes half a minute.

Any hints? Could somebody test, if this problem is common?


但是除了上面介绍到的用到BITMAP的时候效率有别之外,不知道还有没其他的地方还有影响。

到现在我还不是很清楚,这两个在编译代码的时候还有何区别?



posted @ 2006-08-29 12:04  糊涂小猪  阅读(1454)  评论(1编辑  收藏  举报