I was looking for reasons why my engine is slowing down so much, and one thing that caught my eye is how many times h3dFindNodes is being called. It is hogging up the CPU quite a bit, but I am fairly certain it isn't me making the calls. The callstack shows it is being invoked by h3dRender. This is being shown to me via Intel VTune.
Here is the Hotspot Check summary:
Code:
Top Hotspots
Function CPU Time
ZN4Irre12RenderThread15SingleThreadRunEv 5.636s - Mine
h3dFindNodes 4.189s - Here's the bugger.
ZN5OGLFT4Face4drawEh 3.140s - Unavoidable for the time being
ZN4Irre3RunEv 0.655s
ZeqRK9asCStringPKc 0.372s
[Others] 4.290s
It's odd, I thought the biggest bottleneck in my engine would be the liberal use of Angelscript, but apparently I was wrong. Here is the callstack:
Code:
IrreRendering.dll!h3dFindNodes - [Unknown]
IrreRendering.dll!h3dFindNodes+0x2f0f0 - [Unknown]
IrreRendering.dll!h3dFindNodes+0x266fd - [Unknown]
IrreRendering.dll!h3dFindNodes+0x2e1d0 - [Unknown]
IrreRendering.dll!h3dRender+0xce01 - [Unknown]
IrreCore.dll!ZN4Irre8Renderer6RenderEv+0x835fc - [Unknown]
IrreCore.dll!ZN4Irre12RenderThread15SingleThreadRunEv+0x70558 - [Unknown]
IrreCore.dll!ZN4Irre6Engine3RunEv+0x5d694 - [Unknown]
IrreCore.dll!ZN4Irre3RunEv+0x5d9be - [Unknown]
IrreEngine.exe![IrreEngine.exe]+0x13f8 - [Unknown]
IrreEngine.exe![IrreEngine.exe]+0x10da - [Unknown]
IrreEngine.exe![IrreEngine.exe]+0x1177 - [Unknown]
kernel32.dll!RegisterWaitForInputIdle+0x17076 - [Unknown]
By the way, I am on windows so VTune is currently the best option for me. I plan to doublecheck with valgrind when I run it on my Linux machine.