Tile Rendering Time
sheikh-iffi opened this issue · 2 comments
Hi guys,
I am trying to calculate tile render time. Is there a way to do that?
I wanna check the performance difference of using single tile source vs multi-tile sources.
Hi @sheikh-iffi -- there's an internal/development method for measuring this:
scene.debug.timeRebuild(numRebuilds)
Try calling it in the console, and it will rebuild the scene numRebuilds times, and give you average, min, and max times to rebuild the whole scene from scratch. Because of variability, I recommend using a number like 25 to get a good average. For instance, calling it as such should produce a message like this in the console:
Tangram v0.20.1 [info]: Profiled rebuild 25 times: 167 avg (126 min, 202 max)
Hope that helps!
I should note, the scene object here is a shortcut for the scene property on Tangram Leaflet layer, e.g. in a case like this, it could be accessed via layer.scene: https://github.com/tangrams/tangram/blob/master/demos/main.js#L22-L34.