Game Development Community

1.8 vs 1.7.1 performance?

by Helk · in Torque Game Engine Advanced · 01/14/2009 (12:39 pm) · 39 replies

Hi Guys, I recently downloaded 1.8 and ran the stronghold game. It's performance is less than half that of 1.7.1, even in the main menu the framerate in 1.8 is 170 compared to 800 in 1.7.1, not that I really care about that but it was a sign. going to the same positions in the stronghold mission on each version yields a drastic difference in fps, places in 1.7.1 that get 120-150 fps get 60-80 in 1.8 and I'm not noticing any difference. Again this is compared against fresh installed unmodified in any way for both versions, and I've also downloaded the latest drivers for my video card and tried again and had the same results.

Any idea why this is happening? Has anyone else noticed this? Is there a reason for this?

Edit: My system specs are 2.4 duo core, windows xp, 8800gts 640mb, 3 gigs ram
Page«First 1 2 Next»
#21
01/21/2009 (9:26 pm)
@Rene - I'm in no rush, but by patch, do you mean something soon we can use or something in a 1.8.1 patch that is coming much further down the road?
#22
01/21/2009 (9:54 pm)
I wish they would do what some other engines do, and post the little bug fixes in forum for the folk that NEED the fix right away.
#23
01/21/2009 (10:21 pm)
@Caylo, He did on IRC and recommended those changes.
#24
01/21/2009 (10:54 pm)
IRC is not the forums. IRC is not search-able and database-ed for future generations to marvel over. Also notice my undefined participle use over bug fixes is more all encompassing definition of 'bug fixes' not just this particular subject.

Why do i keep reading an undertone of hostility? I feel like Copernicus trying to convince flat minded people the world is round... You can prove for yourself its not simply the TerrainBlock's resource pointer, by running profile tests without any terrain. Also how to explain people commenting that they have 1.7.1 vrs 1.8 performance problems with Atlas terrain? See how the facts dont all line up?

I love to be proven wrong, post some facts so i can go eat worms....
#25
01/21/2009 (11:22 pm)
I think the only hostility being shown in this thread is from you. I'm certainly not exhibiting one. This thread was created because I noticed an issue and wondered if other people were experiencing the same thing, Turns out other people were, and we're all working together to come to a conclusion and fix. I have no idea why the perf is suffering, nor did I claim I did. I never said it was terrain or fencing, Other people did and I posted my results with the fencing fixes someone mentioned to me on IRC. I don't understand what *I've* done wrong... But I'd like to keep a constructive thread going. You've provided some valuable insight and I appreciate that but can you not rain on the parade with posts like that? And for the record I'm pretty sure it's not terrain as I get the same poor results on a blank mission with just a skybox, and I'm going to assume with the changes I made it's probably not the fencing; assuming the advice was sound. I didn't even know what fencing was until this thread.



#26
01/21/2009 (11:53 pm)
Im am sorry, I should have understood that referring to literature in a metaphoric manor could easy be misinterpreted, even with the Copernicus clue.

Im not even misting on the parade, but the only constructive thread i keep getting is "RENE......" who i keep pointing out seems to be working on the wrong issue.

I do keep forgetting what and who im collaborating with here, as a toy/hobby and not exchanging ideas with co-workers.
#27
01/21/2009 (11:59 pm)
The only reason I posted what I posted was I thought what you said was a little out of line, then I went and checked your other forums posts and it's obvious you like stirring the pot and trolling. I'm not going to justify it further with a response so lets get back to the issue at hand. I posted metrics information on your thread, check it out.
#28
01/22/2009 (12:04 am)
indeed, thanks. (I take offence! my grandfather was a bridge troll!)
#29
01/22/2009 (6:32 am)
fwiw - Back when I was developing game engines, I was very happy when they added state blocks to DirectX. It was super-annoying to have to juggle states, and adding in new features would sometimes cause things later down the scene graph to break for no apparent reason.

Mind you, I was very cautious about changing render states, so everything was batched by state (including material). I obeyed the graphics golden rule: Change state as little as possible.

So, I sat down, and rewrote all of my code to use state blocks. This took about two days. It solved all of my problems, every single one. However - I saw between a 20% and 60% decrease in framerate (depending on complexity). My complaints to Microsoft went unheeded - "It's a new feature, driver support will be better in the future, and it will get faster". Being as I had forgotten to check in the code before hand, I then spent the next two or three days ripping the state block code back out.

Now, i'm not saying this is what is causing the slow down. Maybe it is completely unrelated. But I do get an incredible sense of deja-vu.
#30
01/22/2009 (7:02 am)
Interesting Jaimi, ill poke at the code and see if there is any way to test that idea.


EDIT:
I cant find anyway to test this. Impossible to test.
#31
01/23/2009 (12:43 pm)

@William
The changes will be up in the forum so anyone can apply them.

@Jaimi
I'd be surprised if we'd see a significant negative impact from the change over to stateblocks. So far, none of the profiling info hints in that direction (there's slight increases here and there but none that matter). Also, AFAIK some of the GG games (Legions, MB Ultra?) shipped with a GFX2-based version of Torque, so I suppose that tech can be considered reasonably mature.
#32
01/26/2009 (5:48 pm)
At the beginning of StandardMainLoop::doMainLoop in mainLoop.cpp, add
tm->setBackgroundThreshold(mClamp(sgBackgroundProcessSleepTime, 1, 200));
tm->setForegroundThreshold(mClamp(sgTimeManagerProcessInterval, 1, 200));

This should resolve the performance issues you've been seeing, except for those with Legacy terrain.

This fix, and various improvements to Legacy terrain, will be in 1.8.1.
#33
01/26/2009 (6:29 pm)
Holy cow, now my TGEA1.8 FPS test much faster then TGEA1.7.1!

What is the technical reason that fix works, what is it doing that is different?
#34
01/26/2009 (7:13 pm)
@Caylo: We told you GFX2 is vastly improved :). The foreground and background thresholds are a period of time Torque will sleep for after each frame. The defaults which are hardcoded in the TimeManager class are 5ms foreground and 10ms background. This meant that after every frame, TGEA 1.8 would sleep until the total time necessary for the frame was 5ms. Of course, the Win32 sleep function is only precise to within one tick (10ms), so even if that caused Torque to sleep for a "single" millisecond, it might wind up sleeping for 10.

The default pref values are 1ms for the foreground and 25 ms for the background. That fix sets the pref values in the TimeManager, which will generally prevent any actual sleeping (sleep(0) might still happen, but it's a special case). And there's your instant performance boost with two easy lines of code.
#35
01/28/2009 (7:21 pm)
@Alex - awesome, did the trick for me. Now my only thing is that this works fine in window'ed mode, but if I go back to fullscreen, it's back to the same numbers i was getting before applying the fix. Do you know if this works/relevant for fullscreen too.
thanks!
#36
01/28/2009 (7:28 pm)
my bad, i wasn't running the same test condition...with fullscreen i had 8x AA on hence the slowere frame rate....now they are the same...awesome fix Alex!
#37
01/30/2009 (6:41 pm)
Hey Alex, how about posting the terrain fix too :D
#38
02/02/2009 (12:37 am)
Alex, I added those two lines in mainLoop.cpp and didn't improve the FPS. Any ideas?
#39
02/02/2009 (5:37 am)
Quote:This fix, and various improvements to Legacy terrain, will be in 1.8.1.

MmMmm... tasty.
Page«First 1 2 Next»