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

[Replay Details] Performance optimizations for not pre-loading all videos #67430

Closed
Tracked by #63255
billyvg opened this issue Mar 21, 2024 · 0 comments · Fixed by #67657
Closed
Tracked by #63255

[Replay Details] Performance optimizations for not pre-loading all videos #67430

billyvg opened this issue Mar 21, 2024 · 0 comments · Fixed by #67657
Assignees

Comments

@billyvg
Copy link
Member

billyvg commented Mar 21, 2024

For the mobile replay player, we currently eagerly load all videos for the replay. This means we can potentially be loading ~720 videos at once, which is not ideal. Instead we want to intelligently load videos that are right before and right after the current time in the player. Since our "go back" button is 10 seconds, we might want to load 15 or 20 seconds before and after the current playing segment.

michellewzhang added a commit that referenced this issue Mar 27, 2024
- Optimize loading of videos for mobile replays
- This PR modifies the `_videos` array by converting it into a
dictionary that maps segment index to the video element. This makes it
easier to only load videos when requested, rather than preloading them
all at once.
- Also fixes a bug where `currentIndex` was consistently undefined in
the `createVideo` function, but it looks like it's working as expected
now
- Closes #67430
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants