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

Performance improvements for v1.0 #2389

Merged
merged 12 commits into from
Oct 14, 2019

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Oct 2, 2019

This PR will...

  • Push streamed data to the transmuter in roughly one second payloads based on level bitrate
  • Prevent the transmux-worker from posting empty "transmuxComplete" messages (Don't create empty ArrayBuffers)
  • Cleanup and optimize logging
    • Only log frag loading message when fragment changes
    • Remove performance monitor logger (this can be implemented externally)
    • Bind console method in consolePrintFn for direct logging
  • Reduce the amount empty array buffers created and prevent unnecessary copying
  • Load audio track on level loading event rather than level loaded (tracks load at the same time)
  • Remove STARTING state which was only used in the audio stream controller to wait a tick
  • Load first audio fragment while waiting for initPTS (similar to the solution in master using waitingFragment)

Why is this Pull Request needed?

To improve performance of #2370:

  • On sites with other applications and ads competing for resources on the main thread.
    • Pushing too little data to workers is inefficient as it adds round trip time to and from the worker and each of those posts has to occur on the main event loop.
    • It may make sense to change the loader high watermark based on whether or not workers are enabled. The same goes for any other parts of the pipeline that are async (hardware decryption)
  • When starting streams with audio tracks
    • Audio track manifests should be requested in tandem with the chose level playlist, and the first audio fragment should be requested as soon as possible to ensure the fastest start time. Waiting for initPTS made start time worse in this branch compared to master.
  • Reduce major and minor GC by reducing object and memory allocation

Are there any points in the code the reviewer needs to double check?

Still a work in progress and needs rebasing.

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch merged commit 484a372 into video-dev:feature/v1.0.0 Oct 14, 2019
@robwalch robwalch deleted the feature/v1-performance branch October 14, 2019 23:20
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

Successfully merging this pull request may close these issues.

None yet

1 participant