I’m a bit doubtful of the timings per line and I’m not sure those can be trusted…
For eg, subMesh.getMesh().alphaIndex is only a return this.mesh for getMesh() and .alphaIndex is a direct access to the property as alphaIndex is not a getter, it is simply public alphaIndex.
If you really want to see what’s going on if you disable/remove some lines, you can get the sources locally, make the changes and generate a custom package for your testings.
[…] In fact, there’s an easier way which is to simply override BABYLON.RenderingGroup.renderSorted with your customized function.
You were right, the info is off. Sometimes the numbers are off by one line, very deceptive.
I followed your advice and altered some of the functions in the render tree (basically removing code that does not seem to affect my scene in any way) and here are the results (this is the perftest I was talking about, so not a static scene):
no alters:
render time / mesh: 0.029121
altered render, evaluate and renderSorted:
render time / mesh: 0.023908