473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

very poor performance in visual studio 2005

Bob
Hi,
I have a fairly large but not massive project. Visual Studio 2005 is
starting to act very strange when I debug the project. For instance,
if i set a break point, I often can't expand an array to see the
contents. Instead, it will say "function evaluation timed out".
Also, it takes a very long time to start and stop debugging, and
sometimes it won't restart after I pause execution. I don't seem to
have nearly as many problems in smaller projects. Does anyone have
any suggestions on how to improve this performance?

Thanks,
Bob

Jul 17 '07 #1
6 6368
On Mon, 16 Jul 2007 19:06:57 -0700, Bob <bs********@yahoo.comwrote:
[...] For instance,
if i set a break point, I often can't expand an array to see the
contents. Instead, it will say "function evaluation timed out".
Also, it takes a very long time to start and stop debugging, and
sometimes it won't restart after I pause execution. I don't seem to
have nearly as many problems in smaller projects. Does anyone have
any suggestions on how to improve this performance?
I would guess that it has less to do with the size of the project and more
to do with how some particular class in that project that you're debugging
works. Maybe the type of class that's stored in that array, for example.

In particular, VS will by default try to evaluate properties, regardless
of how complicated they are. Sometimes this can run into trouble, if the
property does something beyond just returning the value of some private
field.

As a quick test, you can turn the property evaluate off to see if that
helps. If it does, then you may be able to track down exactly which
property or properties are problematic and hide them from the debugger
with an appropriate attribute applied to the property.

Pete
Jul 17 '07 #2
Bob
On Jul 16, 9:18 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 16 Jul 2007 19:06:57 -0700, Bob <bshumsk...@yahoo.comwrote:
[...] For instance,
if i set a break point, I often can't expand an array to see the
contents. Instead, it will say "function evaluation timed out".
Also, it takes a very long time to start and stop debugging, and
sometimes it won't restart after I pause execution. I don't seem to
have nearly as many problems in smaller projects. Does anyone have
any suggestions on how to improve this performance?

I would guess that it has less to do with the size of the project and more
to do with how some particular class in that project that you're debugging
works. Maybe the type of class that's stored in that array, for example.

In particular, VS will by default try to evaluate properties, regardless
of how complicated they are. Sometimes this can run into trouble, if the
property does something beyond just returning the value of some private
field.

As a quick test, you can turn the property evaluate off to see if that
helps. If it does, then you may be able to track down exactly which
property or properties are problematic and hide them from the debugger
with an appropriate attribute applied to the property.

Pete
Hi Pete,

Thanks for your quick response. I don't think it is a matter of a
complicated class, because I get the same problem even with primitive
collections. For instance, I added the following code to the very
beginning of the project:

List<Stringwhy = new List<string>();
for (int i=0;i<300;i++){
why.Add("Why doesn't this show" + i);

}
Debug.Print("breakpoint here");

If I breakpoint on the Debug.Print line and try to expand the "why"
list, it hangs for like 10 seconds, then gives me nothing. Later, it
sometimes give me "Function evaluation disabled because a previous
function evaluation timed out. You must continue execution to
reenable function evaluation." It also takes a very long time to start
and stop the project. Any ideas?

Jul 17 '07 #3
On Tue, 17 Jul 2007 01:02:50 -0700, Bob <bs********@yahoo.comwrote:
[...]
List<Stringwhy = new List<string>();
for (int i=0;i<300;i++){
why.Add("Why doesn't this show" + i);

}
Debug.Print("breakpoint here");

If I breakpoint on the Debug.Print line and try to expand the "why"
list, it hangs for like 10 seconds, then gives me nothing. Later, it
sometimes give me "Function evaluation disabled because a previous
function evaluation timed out. You must continue execution to
reenable function evaluation." It also takes a very long time to start
and stop the project. Any ideas?
Nope, sorry. Start ripping things out of your project until it works
again.

Can you reproduce the problem in a brand new empty project, to which
you've only added the above?

If not, then I stand by my assertion that you've got something in your
project that's causing the problem. What that might be, I don't know off
the top of my head. Make sure you don't have things displayed in your
memory, watch, etc. windows that are being auto-evaluated when you break
in the debugger to check the above code. Then start removing things from
your project until you remove something that fixes the problem.

Somewhere, it seems that the debugger is trying to evaluate a function.
Since telling it to do so explicitly isn't part of your "repro steps",
obviously it is trying to do so as a result of some implicit evaluation.
When you find that implicit evaluation, you'll know what's going wrong.

Pete
Jul 17 '07 #4
Bob
On Jul 17, 3:02 am, Bob <bshumsk...@yahoo.comwrote:
On Jul 16, 9:18 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 16 Jul 2007 19:06:57 -0700, Bob <bshumsk...@yahoo.comwrote:
[...] For instance,
if i set a break point, I often can't expand an array to see the
contents. Instead, it will say "function evaluation timed out".
Also, it takes a very long time to start and stop debugging, and
sometimes it won't restart after I pause execution. I don't seem to
have nearly as many problems in smaller projects. Does anyone have
any suggestions on how to improve this performance?
I would guess that it has less to do with the size of the project and more
to do with how some particular class in that project that you're debugging
works. Maybe the type of class that's stored in that array, for example.
In particular, VS will by default try to evaluate properties, regardless
of how complicated they are. Sometimes this can run into trouble, if the
property does something beyond just returning the value of some private
field.
As a quick test, you can turn the property evaluate off to see if that
helps. If it does, then you may be able to track down exactly which
property or properties are problematic and hide them from the debugger
with an appropriate attribute applied to the property.
Pete

Hi Pete,

Thanks for your quick response. I don't think it is a matter of a
complicated class, because I get the same problem even with primitive
collections. For instance, I added the following code to the very
beginning of the project:

List<Stringwhy = new List<string>();
for (int i=0;i<300;i++){
why.Add("Why doesn't this show" + i);

}
Debug.Print("breakpoint here");

If I breakpoint on the Debug.Print line and try to expand the "why"
list, it hangs for like 10 seconds, then gives me nothing. Later, it
sometimes give me "Function evaluation disabled because a previous
function evaluation timed out. You must continue execution to
reenable function evaluation." It also takes a very long time to start
and stop the project. Any ideas?
I hope I am not speaking prematurely but I think I may have solved my
problem. I deleted all breakpoints (the option is in the debug menu
in Visual Studio) and the performance improved immensely.

Jul 18 '07 #5
Bob wrote:
On Jul 17, 3:02 am, Bob <bshumsk...@yahoo.comwrote:
On Jul 16, 9:18 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 16 Jul 2007 19:06:57 -0700, Bob <bshumsk...@yahoo.com>
wrote:
[...] For instance,
if i set a break point, I often can't expand an array to see the
contents. Instead, it will say "function evaluation timed out".
Also, it takes a very long time to start and stop debugging, and
sometimes it won't restart after I pause execution. I don't
seem to have nearly as many problems in smaller projects. Does
anyone have any suggestions on how to improve this performance?
I would guess that it has less to do with the size of the project
and more to do with how some particular class in that project
that you're debugging works. Maybe the type of class that's
stored in that array, for example.
In particular, VS will by default try to evaluate properties,
regardless of how complicated they are. Sometimes this can run
into trouble, if the property does something beyond just
returning the value of some private field.
As a quick test, you can turn the property evaluate off to see if
that helps. If it does, then you may be able to track down
exactly which property or properties are problematic and hide
them from the debugger with an appropriate attribute applied to
the property.
Pete
Hi Pete,

Thanks for your quick response. I don't think it is a matter of a
complicated class, because I get the same problem even with
primitive collections. For instance, I added the following code to
the very beginning of the project:

List<Stringwhy = new List<string>();
for (int i=0;i<300;i++){
why.Add("Why doesn't this show" + i);

}
Debug.Print("breakpoint here");

If I breakpoint on the Debug.Print line and try to expand the "why"
list, it hangs for like 10 seconds, then gives me nothing. Later,
it sometimes give me "Function evaluation disabled because a
previous function evaluation timed out. You must continue
execution to reenable function evaluation." It also takes a very
long time to start and stop the project. Any ideas?

I hope I am not speaking prematurely but I think I may have solved my
problem. I deleted all breakpoints (the option is in the debug menu
in Visual Studio) and the performance improved immensely.
Rule of thumb: if you have a breakpoint which has a conditional rule
(e.g. break when this.foo == 42 ), the performance is very slow.
cntrl-shift-f9 is your friend :)

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Jul 18 '07 #6
Bob
On Jul 17, 12:31 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Tue, 17 Jul 2007 01:02:50 -0700, Bob <bshumsk...@yahoo.comwrote:
[...]
List<Stringwhy = new List<string>();
for (int i=0;i<300;i++){
why.Add("Why doesn't this show" + i);
}
Debug.Print("breakpoint here");
If I breakpoint on the Debug.Print line and try to expand the "why"
list, it hangs for like 10 seconds, then gives me nothing. Later, it
sometimes give me "Function evaluation disabled because a previous
function evaluation timed out. You must continue execution to
reenable function evaluation." It also takes a very long time to start
and stop the project. Any ideas?

Nope, sorry. Start ripping things out of your project until it works
again.

Can you reproduce the problem in a brand new empty project, to which
you've only added the above?

If not, then I stand by my assertion that you've got something in your
project that's causing the problem. What that might be, I don't know off
the top of my head. Make sure you don't have things displayed in your
memory, watch, etc. windows that are being auto-evaluated when you break
in the debugger to check the above code. Then start removing things from
your project until you remove something that fixes the problem.

Somewhere, it seems that the debugger is trying to evaluate a function.
Since telling it to do so explicitly isn't part of your "repro steps",
obviously it is trying to do so as a result of some implicit evaluation.
When you find that implicit evaluation, you'll know what's going wrong.

Pete
Hi Pete,
Thanks again for your suggestions. I am pretty sure I figured it
out. I had a bunch of disabled breakpoints which apparently slow
things down dramatically. I deleted all breakpoints in the debug menu
and it seems to have resolved the issues.

Thanks,
Bob

Jul 18 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Shapper | last post by:
Hello, I am starting 2 new projects to deliver in January 2006. I want to create them in Asp.Net 2.0 using Visual Studio 2005. All my clients web sites are Visual Studio 2003 projects in...
16
by: John A. Bailo | last post by:
I was pricing VS.NET Professional 2005 upgrade and found a good price on Amazon -- but then I read the customer reviews and they were terrible: ...
0
by: fiona | last post by:
Innovasys Ltd., a leader in help authoring and documentation tools, today announced the inclusion of a tailored version of the Innovasys HelpStudio help authoring product, HelpStudio Lite, in the...
2
by: bhag | last post by:
hi all, I'm writing because I haven't been able to find enough information at the book stores and at the MS web site on some of my questions. Perhaps I'm asking the wrong questions, but if you...
8
by: WT | last post by:
Is it normal that Visual Studio sets the PreInit handler for a Page from the OnInit code ? No chance to fire it as OnPreInit is run befor OnInit. ??? CS
26
by: Bill | last post by:
Every now and then when I go on my form in the IDE the form goes blank and the computer grinds away for 10 or 20 seconds and then everything reaapears. What exactly is the computer doing and is...
3
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
1
by: =?Utf-8?B?RG91Zw==?= | last post by:
We have a very large code base and use the partitioned solution model for development and deployment. The problem is that in .NET 2005 the setup projects cause severe performance problems when...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.