• Advertisement
Sign in to follow this  

visual studio choppy fps

This topic is 2160 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have a project , a 3rd year final year project .

if i run it inside visual studio , the fps can go to 350 , down to 50 , up to 100 , down to 145, up to 450 ect in the space of about 5 seconds

there is nothing happening in these seconds apart from updating stationary objects and rendering them


if i copy the debug exe into the project and run that , the frame rate is steady 450fps , with no blipping

if i run the analyser, the fps also stays steady ,

can any one think what in visual studio is doing this ?

Share this post


Link to post
Share on other sites
Advertisement
Any watches set in the debugger? These need to update the screen too (as contents of the variables being watched change) and I've observed the same symptoms before. Removing all watches fixed it (the tradeoff, of course, is that you lose your watches).

Share this post


Link to post
Share on other sites
Flooding the console output maybe?
I agree that debugging bring less performance, but it will never create THAT much of a difference and fluctuation, especially if your "non visual studio" executable is also built as debug.
To find the real cause I guess you will have to do some performance profiling.

Share this post


Link to post
Share on other sites
My experience when working with C# is that Debug build causes maybe 5-10% slowdown when compared to Release builds. Running in debug mode (F5) causes 20-50% slowdown when compared to running without debug (double clicking exe or Ctrl-F5), independent on build mode. Running in debug mode with a conditional breakpoint causes 80-95% slowdown. I'm not sure if it slows down the entire program or just the statement to break on (feels like the former but is probably the latter).

By X% slowdown I mean it takes X% longer to complete the same task(s). These numbers are estimations taken strictly from my head and are not based on any scientific benchmarking what-so-ever.

Share this post


Link to post
Share on other sites
It probably depends on language/framework/native-vs-managed then (and the debugging features offered therein); I use the debugger in VS all the time with C/C++ and have never noticed that kind of performance drop on any machine. Yes, it's slower, but only marginally so (10% ish drop max), and it definitely doesn't wildly swing between such extremes.

Share this post


Link to post
Share on other sites
Anything using the CRT debug heap with the debugger attached can cause significant performance fluctuations if your memory allocation patterns aren't carefully controlled. The OP doesn't specify a language or any really useful details about what the project is doing, so your guess is as good as mine as to whether or not that's actually what's going on.

Share this post


Link to post
Share on other sites
I'm assuming from mention of "analyzer" that it's XNA, but that is an assumption, true. Good call on the memory allocation patters - that is one thing that could certainly cause this.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement