Sign in to follow this  

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

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

This topic is 4852 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this