Sign in to follow this  

windows movement 'knocking out' my FPS

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

Hi, I have a C++ engine which runs in windowed mode, the renderloop is inside of it's own high priority thread , this in turn exists inside of an MFC DLL. The engine renders and presents to a hwnd. A basic mesh with 1 light runs at around 2400 frames per second. I think you will agree this is very fast, but , and this is a big but, if I move or minimize a window, like notepad, my FPS is getting knocked to below 100 FPS. Is there any way I can prevent windows operations from impacting on my performance? The hardware is a dual processor system with a GEFORCE 7800 GT card.

Share this post


Link to post
Share on other sites
I can't give you an solution, but IMO it's good behaviour. A nicely behaved 3D app shouldn't hog the CPU when it's not in focus.

Share this post


Link to post
Share on other sites
I completely agree. I personally cannot see any way of "correcting" this behaviour beyond what you've already done -- which was super smart btw :)

Share this post


Link to post
Share on other sites
Note that FPS on light scene loads just don't matter. There's too much overhead and other stuff going on in the system to worry about it. Also, FPS measurements over 100 fps start degrading in accuracy because of the jitter in scheduling and timers (even if you're using QueryPerformanceCounter, which is the best accuracy trade-off these days).

Make sure your scene can provide a reasonable load for your system -- add art until it's down to 200 fps or less, using a release mode build, using release mode drivers. Then start measuring performance behavior.

Last: if your app isn't the foreground/focus app (such as when minimizing the window or activating another window), Windows will not give you all the CPU. Sorry.

Share this post


Link to post
Share on other sites
Hmm,

you talk about the CPU load, the system is dual processor with hyper-threading which gives 4 effective CPU's, at no point is there any maxing out on the cpu. I can see my render loop is running in one of the 4 cpu's in task manager (around 70% usage), but the other 3 cpu's are doing nothing. I can't believe that windows messages are causing so much of a performance drop.

Share this post


Link to post
Share on other sites

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