Hi, we have performance issues in our TV app that is using MSE/EME for playback on webOS 4.
We’re run some performance profiling and the app keeps running Major: GC
every 5 seconds while playing back content. The duration for how long the app is stalled by this varies, but gets longer over time (after an hour of using the app, the main thread is blocked by GC for 4.8s every 5s).
This performance issue seem to affect all libraries built on MSE, we’ve tested hls.js/dash.js/shaka-player.
It can be reproduced with minimal code, requiring no playback libraries:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<video id="video"></video>
<script>
const video = document.getElementById('video');
const mediaSource = new MediaSource();
const objectUrl = URL.createObjectURL(mediaSource);
video.src = objectUrl;
</script>
</body>
</html>
I’ve come across a similar thread on this forum, but unfortunately it had no resolutions.
Hello,
There is a discussion on an old forum:
We also are experincing FPS drops in our application after MediaSource is attached to HTMLVideoElement. Affected TVs: 43UN7300PUF(4.40.76) and older models.
The test application from the discussion also causes FPS drops every 5 seconds (can be observed on a tv screen).
In our case - after MSE attachment - the second GC call is added after the first one blocking the rendering for ~250ms, while it collects 0 bytes, according to Profiler.
[image…
An issue has been raised to shaka-player, but it was concluded that this is a webOS 4 issue.
opened 01:49PM - 16 Jun 22 UTC
closed 06:07PM - 18 Aug 22 UTC
type: external
type: performance
status: archived
platform: WebOS
**Have you read the [FAQ](https://bit.ly/ShakaFAQ) and checked for duplicate ope… n issues?**
Yes
**What version of Shaka Player are you using?**
4.1.1
**Can you reproduce the issue with our latest release version?**
Yes
**Can you reproduce the issue with the latest code from `main`?**
Yes
**Are you using the demo app or your own custom app?**
Yes
**If custom app, can you reproduce the issue using our demo app?**
Yes
**What browser and OS are you using?**
Chrome 79.0.3945.79
**For embedded devices (smart TVs, etc.), what model and firmware version are you using?**
LG model: 32LK615BPLB
OS: webOS 4.4.0,
firmware: 05.40.26
**What are the manifest and license server URIs?**
no manifest used
<!-- NOTE:
You can send the URIs to <shaka-player-issues@google.com> instead,
but please use GitHub and the template for the rest.
A copy of the manifest text or an attached manifest will **not** be
enough to reproduce your issue, and we **will** ask you to send a
URI instead. You can copy the URI of the demo app to send us the
exact asset, licence server, and settings you have selected there.
-->
**What configuration are you using? What is the output of `player.getConfiguration()`?**
default configuration
<!-- NOTE:
You can censor URLs to keep them private, but include them in the email. You
can also use JSON.stringify(obj, null, 2) to print nicely on platforms that
don't print objects well in the console. DON'T SEND '[object Object]'!
-->
**What did you do?**
Initialize new shaka.Player(videoElem);
**What did you expect to happen?**
**What actually happened?**
I see the Major garbage collector runs every 5 seconds after Shaka player is initialized with Chrome DevTool Performance tab. This creates interface lag. It is not necessary to load the manifest to reproduce the issue. After the disposing of the player, the problem disappears.
![mgc](https://user-images.githubusercontent.com/41690735/174084529-30781bfe-9d47-495a-b4ea-5cc8241dbfed.jpg)
Is there any way to resolve this issue on webOS 4?
Thank you!
Please email us the following at developer@lge.com :
Test video showing the issue
Your app .ipk file
Steps to reproduce the issue
And the following information of your test device are also required. (You can check this in the Settings > General > About This TV.)
TV model name:
TV software version:
webOS TV version: (This can be found when you click the TV model name in the About This TV menu.)
Region: