Hello!
Does krpano have debug mode, in main cycle, which can run console.time() ?
We have some performance problems with rendering into webgl, it shows in chrome browser chrome://tracing/
console.time() in main cycle
-
-
Hi,
krpano calls the onviewchange event before it start rendering and the onviewchanged event after the rendering, the remaining time is mainly spend the browser and the system itself executing the drawing calls.
For getting the current 'run-time' the 'timertick' variable can be used:
https://krpano.com/docu/actions/#timertickHere some self-contained xml code to measure the krpano rendering-time, the frame-time and calculating an average framerate - just insert that code as it is into any example:
Code
Display More<layer name="pftest" keep="true" url="%SWFPATH%/plugins/textfield.swf" html="" align="lefttop" zorder="99" /> <events name="pftest" keep="true" onxmlcomplete="copy(t2_prev, timertick); set(sum_frametimes,0); set(cnt_frames,0);" onviewchange="copy(t1, timertick);" onviewchanged="pftest();" /> <action name="pftest"> copy(t2, timertick); calc(rendertime, t2 - t1); calc(frametime, t2 - t2_prev); copy(t2_prev, t2); roundval(rendertime, 2); roundval(frametime, 2); add(sum_frametimes, frametime); inc(cnt_frames); calc(avgfps, 1000 / (sum_frametimes/cnt_frames)); roundval(avgfps); if(cnt_frames GT 200, set(sum_frametimes,0); set(cnt_frames,0);); calc(layer[pftest].html, 'rendertime=' + rendertime + 'ms[br]frametime=' + frametime + 'ms[br]avg.fps=' + avgfps); updatescreen(); </action>
Best regards,
Klaus
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!