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

Increase efficiency of dash manifest parsing #1640

Closed
pawelgliwinski opened this issue Oct 23, 2018 · 8 comments
Closed

Increase efficiency of dash manifest parsing #1640

pawelgliwinski opened this issue Oct 23, 2018 · 8 comments
Assignees
Labels
platform: TV/STB Issues affecting smart TV or set-top box platforms priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: performance A performance issue
Milestone

Comments

@pawelgliwinski
Copy link

Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?:
2.4.4
Can you reproduce the issue with our latest release version?:
yes
Can you reproduce the issue with the latest code from master?:
didn't check
Are you using the demo app or your own custom app?:
custom app
If custom app, can you reproduce the issue using our demo app?:
yes
What browser and OS are you using?:
I'm using LG WebOS 3.0 (LG lh615v)
What are the manifest and license server URIs?:
I can't post it publicly

What did you do?

I'm starting the Dash/Widevine content on LG tv.

What did you expect to happen?
I was expecting the title to start at around 6 to 7 seconds

What actually happened?

The startup time of title took +35 seconds
When starting the title it takes +35 seconds to parse DASH manifest that is of size 1,5 MB. It is seen that most of the time is consumed on recursive call to shaka.dash.DashParser.processXlinks
title startup. The title that has 90kb manifest size starts at around 10 seconds which is still quite slow. Other tvs like WebOS 4 based LG suffer from that issue as well.

What is the cause of such poor performance when it comes to parsing the dash manifest? Are there any config params that could speed up the process?

@TheModMaker TheModMaker changed the title poor parsing time of dash manifest on WebOS Increase efficiency of dash manifest parsing Oct 23, 2018
@TheModMaker TheModMaker added type: enhancement New feature or request platform: TV/STB Issues affecting smart TV or set-top box platforms and removed needs triage labels Oct 23, 2018
@TheModMaker TheModMaker added this to the Backlog milestone Oct 23, 2018
@TheModMaker
Copy link
Contributor

We are aware that the DASH parsing is not too efficient on embedded platforms. We thought it was largely due to the actual parsing of the XML, which we can't change; but it may be that we could do something to make processing it faster.

Does your content actually use xlinks? It would really help if you could provide some example content to test with. I doubt being encrypted will change anything, so you could post clear content.

@TheModMaker
Copy link
Contributor

Also how did you get that dump? It looks similar to Chrome performance tab. Can you save a dump of it and send it to us? You can also privately send the dump and media URLs to shaka-player-issues@google.com and we'll keep it within the team.

@pawelgliwinski
Copy link
Author

pawelgliwinski commented Oct 24, 2018

It would really help if you could provide some example content to test with.

Not sure if there is a clear content there, I'll try to get something in the meantime I'll send the manifest over the email for start.

Also how did you get that dump? It looks similar to Chrome performance tab.

the dump was taken with LG webinspector.

Does your content actually use xlinks?

I don't think we are using xlinks,.

shaka-bot pushed a commit that referenced this issue Oct 24, 2018
- Only traverse children once.
- Avoid traversing into SegmentTimeline, which is usually large and
  won't contain xlinks.

Issue #1640

Change-Id: I8a7a05d580740f9a9953b0a8aec89a06cc7e33f2
@TheModMaker
Copy link
Contributor

I pushed a change to make the xlink part better. You can test it on the nightly page: https://nightly-dot-shaka-player-demo.appspot.com

joeyparrish pushed a commit that referenced this issue Nov 9, 2018
- Only traverse children once.
- Avoid traversing into SegmentTimeline, which is usually large and
  won't contain xlinks.

Issue #1640

Backported to v2.4.x

Change-Id: I8a7a05d580740f9a9953b0a8aec89a06cc7e33f2
@joeyparrish
Copy link
Member

Xlink optimizations have been cherry-picked to v2.4.5.

rounce pushed a commit to rounce/shaka-player that referenced this issue Jul 8, 2019
- Only traverse children once.
- Avoid traversing into SegmentTimeline, which is usually large and
  won't contain xlinks.

Issue shaka-project#1640

Change-Id: I8a7a05d580740f9a9953b0a8aec89a06cc7e33f2
@joeyparrish joeyparrish modified the milestones: Backlog, Backlog 2 Jan 28, 2020
@chadacious
Copy link

chadacious commented Jan 27, 2021

Seems that the processing of xlinks can still be a long operation even with this change in shaka-player 3. Attempting to process a very large mpd (3mb) of the form <SegmentList ...><SegmentUrl mediaRange="..-.." /> will actually crash after several minutes stuck in the processXlinks function of mpd_utils.js.

Should there be a config option to disable xlink processing if we know that our mpd doesn't use xlink?

@joeyparrish joeyparrish added priority: P1 Big impact or workaround impractical; resolve before feature release type: performance A performance issue and removed type: enhancement New feature or request labels Sep 29, 2021
@avelad
Copy link
Collaborator

avelad commented Oct 13, 2021

The config was added in 014e146 , is it enough?

@joeyparrish
Copy link
Member

Yes, but there was no "closes" in PR #3240, so the issue didn't get closed automatically.

@chadacious, you can now use manifest.dash.disableXlinkProcessing to disable xlink. Thanks!

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Dec 12, 2021
@shaka-project shaka-project locked and limited conversation to collaborators Dec 12, 2021
@avelad avelad modified the milestones: Backlog, v3.1 May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: TV/STB Issues affecting smart TV or set-top box platforms priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: performance A performance issue
Projects
None yet
Development

No branches or pull requests

6 participants