Open Bug 1864166 Opened 9 months ago Updated 3 months ago

Higher RAM usage compared to Chrome when a background video trailer plays at hulu.com

Categories

(Core :: Audio/Video, defect, P3)

Firefox 121
Desktop
Windows 10
defect

Tracking

()

Performance Impact low

People

(Reporter: rbucata, Unassigned)

References

()

Details

(Keywords: perf:resource-use)

Attachments

(3 files)

Attached video 20231110_151356.mp4

Environment:
Operating System: Windows 10 PRO x64
Firefox version: Firefox Nightly 121.0a1 (2023-11-09)

Preconditions:
Clean profile
VPN set to the US (New York)

Steps to reproduce:

  1. Navigate to : https://www.hulu.com/hub/home
  2. Perform account login.
  3. Wait for a background trailer to start playing.
  4. Open the task manager and observe the result.

Expected Behavior:
The RAM usage is the same as in Chrome

Actual Behavior:
The RAM usage is higher compared to Chrome.

Notes:

  • Reproducible regardless of the status of ETP.
  • Reproducible on the latest build of Firefox Nightly and Firefox Release
  • Works as expected using Chrome.
  • Screenrec is attached.
  • Performance profile: https://share.firefox.dev/3QBgjmj
  • Issue found during WebCompat team [Top100] websites testing

Verified this issue and still reproduces on Firefox 123 and 125.

Tested with:

Browser / Version: Firefox Release 123.0 (64-bit)/ Firefox Nightly 125.0a1 (2024-02-21) (64-bit) / Chrome Version 122.0.6261.58 (Official Build) (64-bit)
Operating System: Windows 10 PRO x64

Looks like everything is working fine, it's just using more memory. Let's move this to the performance folks for now and let them decide what to do with that.

Component: Desktop → Performance
Product: Web Compatibility → Core

Looking at the profile in comment 0, I'm not seeing any substantial change in memory usage (only 10MB or so difference, for any given process's memory track).

Could you capture a new profile starting before you visit hulu.com (before the memory starts to go up in task manager)? Also, capturing a memory report at about:memory would be useful (when the memory usage is at/near its peak).

Performance Impact: --- → pending-needinfo
Flags: needinfo?(rbucata)
Attached file memory-report.json.gz
Flags: needinfo?(rbucata)

Sure Daniel.

Here is the performance profile before and after accessing the page, and the video background plays: https://share.firefox.dev/49vOMuM

And I have attached the memory report.

This bug was moved into the Performance component.

:rbucata, could you make sure the following information is on this bug?

  • ✅ For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.
  • ✅ For memory usage issues, capture a memory dump from about:memory and attach it to this bug.
  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

If the requested information is already in the bug, please confirm it is recent.

Thank you.

Flags: needinfo?(rbucata)

(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #6)

  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

(Not sure this is relevant/useful in this case; no harm in doing this, but not a priority.)

(In reply to Raul Bucata from comment #5)

Here is the performance profile [...] And I have attached the memory report.

Thanks. The profile shows the hulu.com process growing to use ~300MB of RAM, which seems pretty reasonable for playing large high-quality video (and whatever fancy JS overhead Hulu is doing as part of that).

The attached memory report shows the Hulu process having 404.56 MB in "explicit allocations", and another 200MB or so of other allocations (mostly in js-main-runtime / js-main-runtime-gc-heap-committed). So, assuming that those numbers are additive, that process is really responsible for ~600MB of memory usage, it looks like.

And then it shows the GPU process occupying 262MB of "explicit allocations" and 518MB under "gfx" (for webrender | textures). So that process is responsible for 780MB of usage.

So: combined, those make up nearly 1400MB, which doesn't quite reach the 2.1GB shown in task manager, but makes up the bulk of it (and it's believable that the parent process & other misc. memory usage make up the rest. There might also be some shenenigans where Task Manager over-reports certain memory that's reserved but not used, etc.)

(Again, it's not obvious to me that this is an unusual amount of memory usage for this use-case.)

RE the comparison to Chrome here (which maxes out at around 450MB as shown in your screencast): Chrome never actually shows any video in that screencast. I wonder if that was due to some sort of anti-piracy measure where they're detecting the screen-recording and turning off the video? I can't tell if the video was blocked entirely from playing back in Chrome, vs. was only-displayed-on-the-physical-monitor-but-not-captured-in-the-screencast, vs. something else.

Raul, could you try Chrome on this site again, without any screen-recorder software running (to avoid any possible video-playback-interference), and report back about what their reported memory usage is in that scenario, just to rule out the possibility of anti-piracy video-playback-blocking stuff inadvertently reducing Chrome's memory usage there?

(It's also conceivable that Chrome's DRM-video-playback pipeline has some of the decoding happening in another process or bit of hardware that's simply not showing up in the task manager. That feels sorta-likely, if they're still really only reporting 450MB of memory usage.)

In any case, it seems like this belongs in the Audio/Video component --> Reclassifying.

Component: Performance → Audio/Video
Flags: needinfo?(rbucata)

Raul, in the screen recording, Firefox has another tab open (a profiler tab), might that contribute to the memory usage? Can you check memory usage in the task manager before going to hulu and once the video is playing, in both browsers?

Flags: needinfo?(rbucata)

The Performance Impact Calculator has determined this bug's performance impact to be low. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Windows
Resource impact: Some

Performance Impact: pending-needinfo → low

See also this question from comment 7 (sorry, kinda buried in the middle):

Chrome never actually shows any video in [the attached] screencast. [...]
Raul, could you try Chrome on this site again, without any screen-recorder software running (to avoid any possible video-playback-interference), and report back about what their reported memory usage is in that scenario, just to rule out the possibility of anti-piracy video-playback-blocking stuff inadvertently reducing Chrome's memory usage there?

Yes, sometimes, the screenrec tools used by us are not 100%, and they get blocked now mostly by Hulu, Netflix, Disney, etc. I am wondering, since I am using a VPN service (hulu can not be accessed outside of the US), could that cause video-playback-interference, or affected the usage of resources in anyway? If not, just to rule out that possibility, I will gladly provide the requested info.

Flags: needinfo?(rbucata)

To clarify the main point: do you see video showing up in Chrome at all on your local machine, when you perform the STR? (Do you recall if you saw video playback in Chrome, when you measured Chrome having lower memory usage?)

That's the most important thing right now, for whether there's a real bug here or not. If Chrome's not showing any video during your STR, and Firefox is showing video, then that's likely the whole explanation for why Firefox is using more RAM. :)

(As to the intricacies of how video-capture software, VPN, & actual location might influence the ability for browsers to play back video at Hulu: I could speculate, but I'm not sure. My default assumption would be that the impact would be the same for both browsers.)

So the background video trailer shows on Firefox and Chrome. Not all suggestions on the homepage have a background video trailer, so disliking suggestions is necessary until a suggestion with a video trailer is present.

However, when a background video trailer is present and auto-playing, there are differences in the usage of RAM (memory) in Firefox compared to Chrome.

I will attach the screenshots.

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: