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

Noticeable lag in Phet-io playback wrapper #376

Closed
brooklynlash opened this issue Mar 1, 2021 · 6 comments
Closed

Noticeable lag in Phet-io playback wrapper #376

brooklynlash opened this issue Mar 1, 2021 · 6 comments

Comments

@brooklynlash
Copy link

brooklynlash commented Mar 1, 2021

For phetsims/qa#595, seen on Win10 Firefox and Edge only.
There is about 11+ seconds of lag when playing back the Gravity and Orbits phet-io recording, it stops at the 1 second mark, pauses, and then quickly skips to the 12 second mark or further. I have not seen this on other sims and it was replicated on master.

Note: my gif creator is somewhat laggy as well so it speeds up to the "real time" a bit quicker when replicating.

Visuals:
GOrecording

@zepumph
Copy link
Member

zepumph commented Mar 4, 2021

and then quickly skips to the 12 second mark or further

One potential solution for this part would be in the playback wrapper. Since there is just a single definition of "time progressed" in the playback wrapper, when something occurs very slowly, it pushes back every event afterwards. So events that could play normally are actually played much quicker. Perhaps we could work this out in the playback wrapper to reset the clock when we detect that an event took longer in the playback wrapper than it did in the recording.

I will caveat this whole issue by saying that the playback wrapper isn't really supposed to be a production-level application. At least not in practice. We have perhaps had two researchers back in 2017 use it. Otherwise it is a tool we use to confirm that recording is working as expected. So minor details like this speed-up/lag don't bother me at all (except to entice me with the fun algorithms that could be employed to fix them, like above).

@zepumph
Copy link
Member

zepumph commented Mar 4, 2021

I also want to add that I encountered the exact same lag in BAA over in https://github.com/phetsims/special-ops/issues/189. To be clear, this is just generally laggy because of qualities of our playback algorithm (like async event passing). Though it is correlated to the complexity of the sim's playback, I'm unsure how much there is to be done within each sim.

@KatieWoe
Copy link
Contributor

This is in phetsims/qa#624

@samreid
Copy link
Member

samreid commented Mar 17, 2021

Based on #376 (comment), I don't think this issues would block RC.2.

@samreid
Copy link
Member

samreid commented Mar 22, 2021

Using ?screens=1 cuts the lag in about half, perhaps it is the long list of messages emitted on startup that are causing the problem?

@zepumph
Copy link
Member

zepumph commented Mar 17, 2022

We no longer support this wrapper, so I'm going to close this issue as a wontfix, see https://github.com/phetsims/phet-io/issues/1854

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

No branches or pull requests

4 participants