Profiler Output ?
by Chris Labombard · in Torque Game Engine · 08/17/2005 (6:45 am) · 18 replies
Hey. My game is running quite slow, so I decided to run the profiler doo hickey to see what is going on.
I have no frame of reference so I don't know if what it spat out is good or bad.
Anyone else mind taking a look and teling me your thoughts ?
This is not formatted very well... I will find a better way and repost this :) For now, this seems to be the important part.
I have no frame of reference so I don't know if what it spat out is good or bad.
Anyone else mind taking a look and teling me your thoughts ?
This is not formatted very well... I will find a better way and repost this :) For now, this seems to be the important part.
Quote:
Profiler Data Dump:
Ordered by non-sub total time -
%%NSTime %% Time Invoke # Name
6.582 11.790 37502 Player_PhysicsSection
5.200 5.200 32920 Player_UpdatePos
1.556 13.960 43509 Player_ProcessTick
1.264 1.701 99 ProcessInputEvent
1.126 4.152 315 AdvanceClientTime
62.912 63.300 4327 TSShapeInstanceRender
4.405 70.331 6828 SceneStateRenderImage
3.700 3.700 315 glFinish
3.372 17.349 2204 AdvanceObjects
0.895 72.709 315 CanvasRenderControls
0.877 0.879 33169 UpdateActionThread
0.807 0.870 315 ServerNetProcess
0.595 0.610 315 SimAdvanceTime
0.546 41.175 2243 ShapeBaseRenderObject
0.537 0.537 315 SwapBuffers
0.530 0.569 315 BuildSceneTree
0.502 0.502 43717 MemoryAlloc
0.470 0.470 8343 ContainerCastRay
0.447 100.000 315 MainLoop
0.399 0.399 4873 DrawText
0.382 0.382 4327 TSShapeInstanceMaterials
0.316 0.316 315 SkyRender
0.279 0.279 6 TerrainRenderBuildBlendMap
0.255 0.255 315 TerrainRenderRecurse
0.252 0.252 9389 TerrainRenderXFRender
0.217 0.222 315 ClientNetProcess
0.186 0.186 2540 TerrainRenderDetails
0.178 0.178 9390 TerrainRenderBuild
0.171 0.171 315 BuildFogTexture
0.167 0.167 315 CanvasPreRender
0.120 71.349 315 GameRenderWorld
0.117 1.079 315 TerrainRenderEmit
0.098 0.135 4327 GetLightingAmbientColor
0.094 0.094 43695 MemoryFree
0.076 70.421 315 TraverseScene
0.056 0.056 9389 TerrainRenderBind
0.052 10.888 1146 PlayerRenderMounted
0.050 4.234 315 ClientProcess
0.035 71.229 315 SceneGraphRender
0.034 14.096 666 ShapeBaseRenderPrimary
0.030 15.492 431 PlayerRenderPrimary
0.021 97.852 315 ProcessTimeEvent
0.020 0.020 315 TerrainRenderSetup
0.020 0.020 431 PlayerRenderShadow
0.016 14.772 315 AdvanceServerTime
0.008 77.121 315 RenderFrame
0.008 0.008 9389 TerrainRenderSetVertexBuffer
0.006 0.006 4327 TSShapeInstanceRenderBillboards
0.004 0.004 315 RegisterLights
0.004 0.007 516 MemoryRealloc
0.004 1.357 315 TerrainRender
0.003 14.775 315 ServerProcess
0.002 0.002 9390 TerrainRenderLock
0.002 0.002 9390 TerrainRenderUnlock
0.000 0.000 666 ShapeBaseRenderShadow
About the author
I have been a professional game programmer for over 5 years now. I've worked on virtually every platform, dozens of games and released a few of my own games, including 2 iPhone titles and a title waiting release on Big Fish Games.
#2
Optomize how ? I realize that it is eating up a lot of time, but I don't know how to stop that. I am pushing a lot of polys, but I thought it was taking a long time because the vid card isn't the greatest.
2 Ghz Celeron
256 MB Ram
64 Mb GeForce 2 Mx/MX 400
I'm only running at 800x600 because anything greater runs like a turtle.
I get 10 fps when I'm look out over the water with nothing else in view.
08/17/2005 (7:55 am)
Thanks for the reply :) Optomize how ? I realize that it is eating up a lot of time, but I don't know how to stop that. I am pushing a lot of polys, but I thought it was taking a long time because the vid card isn't the greatest.
2 Ghz Celeron
256 MB Ram
64 Mb GeForce 2 Mx/MX 400
I'm only running at 800x600 because anything greater runs like a turtle.
I get 10 fps when I'm look out over the water with nothing else in view.
#3
08/17/2005 (8:48 am)
@Chirs - What is in your scene? I assume you're adding *alot* of DTS shapes? Maybe there is a better way to achieve what your trying to do.
#4
08/17/2005 (9:02 am)
Tom - It reads 63% with a viewing distance of 15, and nothing but my 800 poly player, terrain and a little water in the scene.
#5
08/17/2005 (9:13 am)
Humm... that seems like really poor performance for such a simple scene... even for a GF2. Is this the standard Torque Orc player model? Have you tried to update your video drivers?
#6
This is in newMission.cs where there are NO objects.
it's not the standard Orc... It is Basic Bob ;) .... I dont have the standard Orc here. It seems a waste to download the entire sdk just to get him.
08/17/2005 (9:13 am)
I just tried rendering a scene with nothing but the player falling.... It was at 55%. This is in newMission.cs where there are NO objects.
it's not the standard Orc... It is Basic Bob ;) .... I dont have the standard Orc here. It seems a waste to download the entire sdk just to get him.
#7
08/17/2005 (9:16 am)
One other thing... it does this on 3 machines. I tried updating hte vid drivers on one of them but it didnt help.
#8
08/17/2005 (9:16 am)
Are you running the debug executable? It has slower performance naturally.
#9
I tried the same, falling experiemnt with another player model. It was even worse. Running 75%.
08/17/2005 (9:25 am)
Jason - I don't know how to tell if it is debug or not in Eclipse / TBE. I'm used to MSVC6.I tried the same, falling experiemnt with another player model. It was even worse. Running 75%.
#10
The framerate is much more stable now. Hopefully I can update the drivers on my other machine and get it running as well. :)
08/17/2005 (10:14 am)
I update the drivers on this machine. Now it looks like this:Quote:
7.394 100.000 396 MainLoop
19.499 19.499 396 glFinish
17.957 47.254 39576 SceneStateRenderImage
4.951 8.916 18031 Player_PhysicsSection
4.447 4.447 35616 TSShapeInstanceMaterials
3.964 3.964 17609 Player_UpdatePos
3.031 14.075 1433 AdvanceObjects
17.259 21.768 35616 TSShapeInstanceRender
The framerate is much more stable now. Hopefully I can update the drivers on my other machine and get it running as well. :)
#11
Also it brings to mind that setting aside an area in your released games help file for links to driver sites is a good idea too :)
08/17/2005 (10:17 am)
Wow, thanks for showing the results... really shows how updated drivers can help. Also it brings to mind that setting aside an area in your released games help file for links to driver sites is a good idea too :)
#12
08/17/2005 (10:22 am)
Mathew - Yes it is. If I had tried my game with the old drivers I never would have bought it. With the new drivers there is a much better chance I would have ;)
#13
08/17/2005 (2:45 pm)
And here i felt lame blaming it on the driver. =)
#14
The first part shows "raw" scores as such. A higher levelmethod call will INCLUDE the time
spent in sub-methods called from it. Notice that main loop = 100%
you want to look at the SECOND hafl of the dump. That part subtracts out the time spent
on called methods. In that list main loop is no longer 100%.
If you are checking the right list then ALL the % should add up to 100%. If you see that it
clearly adds up to more than 100% then you are looking at the first half instead of
the second half like you should.
08/17/2005 (4:00 pm)
Also you are looking at the WRONG part of the dump.The first part shows "raw" scores as such. A higher levelmethod call will INCLUDE the time
spent in sub-methods called from it. Notice that main loop = 100%
you want to look at the SECOND hafl of the dump. That part subtracts out the time spent
on called methods. In that list main loop is no longer 100%.
If you are checking the right list then ALL the % should add up to 100%. If you see that it
clearly adds up to more than 100% then you are looking at the first half instead of
the second half like you should.
#15
Paul. Yes, you are right, the second half breaks it down. But the calls I was interested in dont get broken down any further.
08/17/2005 (4:03 pm)
Tom - I thoguth you were being lame too ;) .... But I decided it was stupid to not even try.Paul. Yes, you are right, the second half breaks it down. But the calls I was interested in dont get broken down any further.
#16
08/17/2005 (4:21 pm)
So add some profiler blocks? :)
#17
I do have a question for you though Ben. in another thread you told someone to comment out glfinish(); because it was going to be a bottleneck.
Where do you comment it out of ? WinGLSpecilal.cc ? guiCanvas.cc ?
08/17/2005 (5:22 pm)
Well, I dont really need to now that it is running decently ;)I do have a question for you though Ben. in another thread you told someone to comment out glfinish(); because it was going to be a bottleneck.
Where do you comment it out of ? WinGLSpecilal.cc ? guiCanvas.cc ?
#18
08/18/2005 (12:14 pm)
Wherever it's being called. It shouldn't be called more than once.
Torque Owner Mikael Andersson
Your TSShapeInstanceRender is using up a lot of time(63%) so you should try to optimize that part. Which means everything that TSShape Renders. Like TSStatics etc.