Open Bug 1938051 Opened 2 months ago Updated 12 days ago

Excessive memory usage of webrender (render-texture-hosts) on Google spreadsheets

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

People

(Reporter: whimboo, Unassigned, NeedInfo)

References

Details

When creating a memory report via about:memory yesterday I noticed a high memory usage of WebRender especially in render-texture-hosts.

2,365.59 MB (100.0%) -- gfx
└2,365.59 MB (100.0%) -- webrender
   ├──1,680.66 MB (71.05%) -- textures
  │  ├──1,521.47 MB (64.32%) ── render-texture-hosts

After closing same tabs and minimizing memory it turns out that it might belong to a Google spreadsheet that I edited yesterday. After closing it and minimizing memory the memory usage of WebRender dropped by 900MB. Reopening the tab added again about 500MB.

This is the Google spreadsheet that is causing the issue.

:gw, can you comment to this bug?

Severity: -- → S3
Flags: needinfo?(gwatson)

Interesting is that I can also see a huge memory usage for the js-realm of the same spreadsheet, which actually references the scripted sheet where I have a IMPORTDATA function running in the cell C1. Maybe this is related and it leaks memory?

5,388,814,304 B (100.0%) -- explicit
├──5,037,170,232 B (93.47%) -- window-objects
│  ├──4,841,831,696 B (89.85%) -- top(https://docs.google.com/spreadsheets/d/1mjV9qLSR6FNtAjKCvNP4QBW7Ea2Q5JwsVxbszbYqEMQ/edit?gid=1346698167#gid=1346698167, id=180)
│  │  ├──4,715,812,936 B (87.51%) -- active
│  │  │  ├──4,681,833,032 B (86.88%) -- window(https://docs.google.com/spreadsheets/d/1mjV9qLSR6FNtAjKCvNP4QBW7Ea2Q5JwsVxbszbYqEMQ/edit?gid=1346698167#gid=1346698167)
│  │  │  │  ├──4,625,974,112 B (85.84%) -- js-realm(https://docs.google.com/spreadsheets/d/1mjV9qLSR6FNtAjKCvNP4QBW7Ea2Q5JwsVxbszbYqEMQ/edit?gid=1346698167#gid=1346698167)
│  │  │  │  │  ├──4,611,263,616 B (85.57%) -- classes
│  │  │  │  │  │  ├──4,018,965,696 B (74.58%) -- class(Object)/objects
│  │  │  │  │  │  │  ├──2,595,349,296 B (48.16%) ── gc-heap
│  │  │  │  │  │  │  └──1,423,616,400 B (26.42%) -- malloc-heap
│  │  │  │  │  │  │     ├──1,418,309,024 B (26.32%) ── slots

What platform is this on? Opening that doc on Linux reports ~245 MB of memory in render texture hosts on Linux on my local machine.

Flags: needinfo?(gwatson) → needinfo?(hskupin)

I'm on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14.7.1; rv:135.0) Gecko/20100101 Firefox/135.0 ID:20250105092842.

You most likely have to make a copy of the file and run that import multiple times. Therefore go to the scripted (5th) tab and press F2 on the C1 cell. Change the u=1 to something else and press return. This will re-load the data. Also maybe copy and paste entries from that tab over to the 4th tab.

Sorry, but I do not have exact steps yet. Happy to record a memory profile if you could tell exactly what needs to be measured.

Flags: needinfo?(hskupin)

Andrew, could you please take a look at comment 2? The leak in gc-heap is probably different. So shall I file a separate bug for it?

Flags: needinfo?(continuation)

Sure, though I'm not sure who is going to look into it. It isn't necessarily a leak, but that does seem like an awful lot of memory for a single spreadsheet.

Flags: needinfo?(continuation)
See Also: → 1944803

(In reply to Andrew McCreight [:mccr8] from comment #6)

Sure, though I'm not sure who is going to look into it. It isn't necessarily a leak, but that does seem like an awful lot of memory for a single spreadsheet.

Sure. Filed bug 1944803 for the JS part.

Glenn, maybe you can check my comment 4? Anything I could further help with? Thanks.

Flags: needinfo?(gwatson)

Added to gfx-triage so we can determine an appropriate priority and who may have time to look at this.

Blocks: gfx-triage
Flags: needinfo?(gwatson)

It seems like this is probably S3 P3 for now, unless we see a smoking gun or more widespread issues.

It would probably be nice to be able to see a breakdown of what the render-texture-hosts are, even if it's just "came from origin sheets.google.com" or something.

Priority: -- → P3
No longer blocks: gfx-triage

(In reply to Kelsey Gilbert [:jgilbert] from comment #9)

It would probably be nice to be able to see a breakdown of what the render-texture-hosts are, even if it's just "came from origin sheets.google.com" or something.

How could this be done? Is there some extra setting that I would have to use to get this information? Happy to provide the requested information.

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