Jump to content
  • Advertisement
Sign in to follow this  
Stru

[.net] Performance better with Visual Studio running???

This topic is 5096 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

This doesn't make any sense but when I run my game from Visual Studio I get around 400 fps, but when I try to run from the .exe I only get around 120 fps. I thought maybe it had to with how it was being launched but then I tried running the .exe and opening visual studio afterwards, and as soon as visual studio opens my framerate jumps up to around 400, Then I close it and it returns to 120. I have no idea why this would happen, Has anyone else had this problem? I'd really like it to be 400 all the time. Any ideas? I'm totally baffled.

Share this post


Link to post
Share on other sites
Advertisement
I tried both and it made no difference.

[edit] I've tested it some more and it only happens in fullscreen mode. In windowed mode it makes no difference. And I noticed that some of the polys were distorted when visual studio is open (like they are being rounded wrong or something). Maybe it has something to do with Double to Integer conversion? I still dont know how opening visual studio while the game is already running can make a difference.

[Edited by - Stru on August 25, 2004 5:34:28 PM]

Share this post


Link to post
Share on other sites
I still can't figure this out. Its driving me crazy. I even tried using the CLR profiler and I get better framerate when that is running on the .exe than the .exe by itself. Which I didn't think was possible. It seems to have the same effect as having Visual Studio open. Although the framerate is still less than the .exe with Visual Studio open (I assume because of the profiling)

Does anyone have any idea what would cause this?

Share this post


Link to post
Share on other sites
Nobody has any idea what would cause this???

VisualStudio or CLRProfiler open and running the .exe(but not profiling)
=430 frames per second

CLR Profiler running and profiling my game
=200 frames per second

Game.exe all by itself
=120 frames per second

I've triple checked my framerate counter. I've used timeGetTime / QeuryPerformanceCounter / even a timer on my form nothing makes a difference. I've tried with Application.DoEvents() and I've tried with a separate rendering thread and nothing changes. I still get the same weird results. It doesnt make any sense to me at all. Could it be a DirectX problem? Some weird optimization thing I don't know about in .NET? Nothing I try seems to make any difference. I'm pulling my hair out with this problem.

Share this post


Link to post
Share on other sites
Do you have the same processes running when you run visual studio + the game \ the game.


Try

Restarting PC
Running it with visual studio
Restarting PC
Running it without visual studio

Ive heard of this before and im interested in what the cause is.

Share this post


Link to post
Share on other sites
I've restarted lots of times and since I've been trying to fix this for a week. The only extra process that runs when visual studio is open is devenv.exe, and its the same with CLRProfiler.exe, and with the Game its just game.exe

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
When you launch from VS, it sets the application's working directory to the project directory, rather than the /debug or /release sub-folders. If your application is loading relative to its working directory, is it possible you have more conservative copies of the media files in your project folder, as opposed to your release folder? Or perhaps the media files aren't being loaded at all because of this.

Share this post


Link to post
Share on other sites
My textures are loading fine, I don't think it has anything to do with launching from VS because i can run the .exe then open visual studio and get the good framerate, then as soon as I close visual studio the game's framerate drops back down.

Share this post


Link to post
Share on other sites
Maybe visual studio does something to the garbage collector?

I am just searching for some answers atm Ill get back if I find something.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!