Closed
Bug 1424168
Opened 7 years ago
Closed 7 years ago
[Fennec][HLS] Exoplayer causes high memory usage on some websites.
Categories
(Firefox for Android Graveyard :: Audio/Video, enhancement, P2)
Firefox for Android Graveyard
Audio/Video
Tracking
(firefox59 fixed)
RESOLVED
FIXED
Firefox 59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: JamesCheng, Assigned: JamesCheng)
References
Details
Attachments
(1 file)
I found this site
https://www.buzzfeed.com/news?utm_term=.fgG1PqnqB#.iuLzMwjwq
will make Exoplayer consume memory a lot to 80% on my Google Pixel.
That means it will make OOO in some lower level devices.
I will try to find if anything that we can improve.
Assignee | ||
Updated•7 years ago
|
Priority: P2 → --
Assignee | ||
Comment 1•7 years ago
|
||
Reword comment 0
s/OOO/OOM
In addition, I can use Android Device Monitor to watch the memory consumption of the Fennec.
Assignee | ||
Comment 2•7 years ago
|
||
12-08 14:46:01.180 12714 12738 I Gecko : [Main Thread]: D/nsMediaElement 0xb67c5000 SuspendOrResumeElement(pause=0, suspendEvents=0) hidden=0
12-08 14:46:01.215 12714 12738 I Gecko : [Main Thread]: D/nsMediaElement 0xbcbb0000 SuspendOrResumeElement(pause=0, suspendEvents=0) hidden=0
12-08 14:46:01.251 12714 12738 I Gecko : [Main Thread]: D/nsMediaElement 0xbcba7800 SuspendOrResumeElement(pause=0, suspendEvents=0) hidden=0
12-08 14:46:01.281 12714 12738 I Gecko : [Main Thread]: D/nsMediaElement 0xbcced000 SuspendOrResumeElement(pause=0, suspendEvents=0) hidden=0
12-08 14:46:01.298 12714 12738 I Gecko : [Main Thread]: D/nsMediaElement 0xbccee000 SuspendOrResumeElement(pause=0, suspendEvents=0) hidden=0
12-08 14:46:01.315 12714 12738 I Gecko : [Main Thread]: D/nsMediaElement 0xbccee800 SuspendOrResumeElement(pause=0, suspendEvents=0) hidden=0
The site creates 6 media element without playing it so that each mediaelemnt will bind a Exoplayer instance which may consume memory...
Comment 3•7 years ago
|
||
We use DefaultLoadControl [1] as the load controller in our GeckoHlsPlayer. In theory, it attempts to buffer 30000 ms data at most.
So using ExoPlayerFactory.newInstance [2] with a customized load controller may help.
[1] https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/thirdparty/java/com/google/android/exoplayer2/DefaultLoadControl.java#34-39
[2] https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/thirdparty/java/com/google/android/exoplayer2/ExoPlayerFactory.java#169-170
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8936460 -
Flags: review?(kikuo)
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8936460 [details]
Bug 1424168 - Reduce the Exoplayer buffer size to avoid OOM.
https://reviewboard.mozilla.org/r/207178/#review213044
::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java:571
(Diff revision 1)
> + // See Bug 1424168.
> + DefaultLoadControl dlc =
> + new DefaultLoadControl(
> + new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE),
> + DefaultLoadControl.DEFAULT_MIN_BUFFER_MS,
> + 15000, /*this value can eliminate the memory usage immensely by experiment*/
I'd suggest using "DEFAULT_MAX_BUFFER_MS / 2" or DEFAULT_MIN_BUFFER_MS here directly, so that we can have a clear sense of what's happening here which is you're setting the max buffer ms to the min buffer ms.
And what if the "max buffer ms" is accidentaly set to a value smaller than the "min buffer ms" ?
should we check for that ?
Updated•7 years ago
|
Priority: -- → P2
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8936460 [details]
Bug 1424168 - Reduce the Exoplayer buffer size to avoid OOM.
https://reviewboard.mozilla.org/r/207178/#review213058
Attachment #8936460 -
Flags: review?(kikuo) → review+
Pushed by jacheng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0d60eea85ffd
Reduce the Exoplayer buffer size to avoid OOM. r=kikuo
Comment 10•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Comment 11•6 years ago
|
||
Here you'll get Greatest Funny Text Memes, distinguished by popularity as per overall sites on the Web. Check out our Grumpy Cat, Hilarious, Funniest, Dog, Internet memes and much more.
https://textmemes.com/
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•