Too much time passes between xrEndFrame() and xrWaitFrame()
Closed this issue · 1 comments
According to folks at Microsoft we're spending 12ms between xrEndFrame()
and xrWaitFrame()
, which is potentially leading to low FPS.
One potential fix is to always call wait_for_animation_frame
just after rendering. Currently we wait for script to send the RequestAnimationFrame
message before doing so. This is #97
However, I would be surprised if there were any instances where there was a time delay between these anyway, because script currently unconditionally calls request_animation_frame
immediately after render_animation_frame
anyway. Perhaps the IPC is causing a delay, though.
Furthermore, to be truly spec compliant, we shouldn't be waiting on script at all, the loop is just supposed to tick and send updated state to script, which is free to do things with it if it wishes (but it doesn't have to). This might be a bigger change.
cc @asajeffrey