Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too much time passes between xrEndFrame() and xrWaitFrame() #96

Closed
Manishearth opened this issue Nov 21, 2019 · 1 comment
Closed

Too much time passes between xrEndFrame() and xrWaitFrame() #96

Manishearth opened this issue Nov 21, 2019 · 1 comment

Comments

@Manishearth
Copy link
Member

Manishearth commented Nov 21, 2019

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

bors-servo pushed a commit that referenced this issue Nov 22, 2019
Always call wait_for_animation_frame after rendering

Potential fix for #96

I need to profile things first to see if this improves anything.

cc @asajeffrey
@Manishearth
Copy link
Member Author

#97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant