Major Performance Decrease in Revision 403

Feb 13, 2010 at 3:00 AM
Edited Feb 13, 2010 at 3:08 AM

I just updated to revision 403 and experienced a dramatic performance decrease.  
Before today, my modified version of GameDemo never dropped below 60FPS on my PC even with these customizations:
    Backbuffer size: 1920 x 1080
    Virtual Resolution: 1920 x 1080
    WaterReflectionMapSize: 2
    DepthStencilBufferSize: 2
    DirectionalShadowRange: 1024
    DirectionalShadowSize: 1024x1024
    4x Anti-Aliasing
    Various mag, min and mipfilter settings changes in the standard .fx files
    FovCamera FarPlane: 4096
    Fog range: 512-2560
    
Now it is running at ~45-55FPS. I didn't change any hardware or install any new software. I made no new changes except to adjust for the new camera.
My comp specs are:
    OS: Windows Vista Home Premium SP2
    CPU: Intel Core2 Quad Q9300 @2.5Ghz
    RAM: 4GB of DDR2 PC2-6400U DDR2-800
    Video Card: NVIDIA GeForce 9800 GTX+ 512MB
    HD: 500GB SATA300 7200 RPM (120GB free)
    Resolution: 1920x1200

I experienced no noticable performance improvement after these optimizations:
    Anti-Aliasing off
    Generate Mipmaps on for terrain textures in ContentFiles
    DefaultEngine:
        SceneSystem:
            return new SceneSystem(this,
                    new Transfer<ISpatialContainer<SceneComponent>>(
                        new Quadtree<SceneComponent>(Vector3.Zero, new Vector3(2048, 1024, 2048), 4, () =>
                            new FastQueriableCollection<SceneComponent>())));
        PhysicsSystem:
            physicsSystem.SolverType = PhysicsSystem.Solver.Fast;
            physicsSystem.CollisionSystem.UseSweepTests = true;
            physicsSystem.NumCollisionIterations = 4;
            physicsSystem.NumContactIterations = 6;
            physicsSystem.NumPenetrationRelaxtionTimesteps = 8;
            physicsSystem.EnableFreezing = true;
        
I experienced minor (2-4FPS) performance improvement after enabling Compress content pipeline output files in Content Build of ContentFiles.

Here's my modified ExamplePlayer.cs

It doesn't seem to make any difference whether I occupy more of the view with land or water.

Anyone else experiencing similar problems?

If not, any ideas what might have caused such a dramatic difference?

Coordinator
Feb 13, 2010 at 3:58 AM

It's probably the fact that the water's reflection algorithm is different.

If you're concerned about perf, it's time for you to break out the profiler. I use and recommend ANTS. I've profiled and optimized the hell out of Ox, but it's likely that unexpected usage cases will hit spots I've not anticipated. With me being able to run Ox only in reference mode, no profiler is going to do me any good until I get the video card.

BTW, do you really need a far plane of 4096?

Feb 13, 2010 at 6:21 AM
bryanedds wrote:

It's probably the fact that the water's reflection algorithm is different.

Ah, sure enough. Removing the water speeds it right back up.

If you're concerned about perf, it's time for you to break out the profiler. I use and recommend ANTS. I've profiled and optimized the hell out of Ox, but it's likely that unexpected usage cases will hit spots I've not anticipated.

Good point. Sometimes I have trouble with dotTrace traces being unable to continue because it wants microsoft.xna.framework.game.pdb or microsoft.xna.framework.pdb.

With me being able to run Ox only in reference mode, no profiler is going to do me any good until I get the video card.

Yeah, that can't be any fun. Working on an engine based on a GPU-intensive framework without a GPU seems like it would be fairly challenging.

BTW, do you really need a far plane of 4096?

I don't think I'll end up needing that much view distance. I wasn't as concerned with particular details like that so much as bringing the performance shift to your attention in case it was due to some issue you may have been unaware of (or due to some customization I'd made that didn't play nicely with engine updates). Thanks for the help. Your response time is impressive~

Coordinator
Feb 13, 2010 at 6:28 AM

>> Yeah, that can't be any fun. Working on an engine based on a GPU-intensive framework without a GPU seems like it would be fairly challenging.

It has brought me to my wits end, tbh :) It's a special kind of suffering for a programmer to have bugs in his own code that he doesn't have the means to fix ;) I am eternally grateful for Richard for sending me the video card :D

Cheers!

Editor
Feb 13, 2010 at 11:28 AM

did it arrive yet? :D

Coordinator
Feb 13, 2010 at 8:17 PM

not yet ;)

where'd you ship it from?

Editor
Feb 13, 2010 at 9:04 PM

United Kingdom :D

Coordinator
Feb 20, 2010 at 12:57 AM

hey bubzy,

I got the card finally! But it doesn't support shader model 3.0, so therefore not going to work for Ox's 3D stuff.

Heh.

Editor
Feb 20, 2010 at 5:47 AM
Edited Feb 20, 2010 at 5:52 AM

ah man, sorry about that :/ took a while to get there !, put a donations link up, ill give ya a couple of dollars towards a new one.

Coordinator
Feb 20, 2010 at 10:55 AM

ah, can do. gonna need to figure out how to do it tho :)

cheers!