Excessive memory usage (~5GB) when searching in Google spreadsheets with large content
Categories
(Core :: Performance: Memory, defect)
Tracking
()
| Performance Impact | low |
People
(Reporter: whimboo, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf, power)
When creating a memory report via about:memory I can regularly see a high memory usage of the Gmail tab especially in class(Object)/objects:
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
This is the Google spreadsheet that is causing the issue.
Steps to reproduce:
- Open the sheet
Test Results: Firefox. - Scroll down a bit and copy a test name from column C
- Scroll to the beginning again and press Meta+F to open the speadsheet's find bar. Search for this test.
- Repeat the same a couple of times and observe the increased memory usage for each search step.
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 (last one) where I have a IMPORTDATA function running in the cell C1. Maybe this is related and it leaks memory?
Note that there is also bug 1938051 for the high memory usage related to webrender.
| Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
I can't reproduce on linux. Memory usage is ~500MB with STR.
| Reporter | ||
Comment 2•1 year ago
|
||
I just noticed that I haven't shared a Gecko profile yet. So here is one fresh recorded with a recent Nightly, which shows 4 searches and the increased memory consumption of the content process : https://share.firefox.dev/4ifXaTv
Updated•1 year ago
|
Comment 3•11 months ago
|
||
The severity field is not set for this bug.
:jlink, could you have a look please?
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 4•11 months ago
|
||
Clarifying the actual issue here. Whenever I'm working with the referenced spreadsheet the problem manifests when actually searching for specific content that is located outside of the currently visible viewport.
Note that forcing a reload of the page actually gets rid of all the extra memory. So it's at least a workaround until the underlying issue has been investigated.
| Reporter | ||
Comment 5•10 months ago
|
||
Is there anything else that I could do to give more details about this leak? Not sure if the profile, that I've provided above in comment 2, is enough or not.
Comment 6•10 months ago
|
||
Performance profiles aren't usually useful with memory leaks. One needs GC/CC logs when the memory usage hasn't gone up too much.
Comment 7•10 months ago
|
||
Since you are able to reproduce the issue, a profile with memory allocations logged might be helpful. To do this, check the boxes for "JS Allocations" and "Native Allocations" in the profiler settings. (You can also turn on Screenshots for this profile.)
To make it most effective, don't start the profile until the initial load has settled down, and let it run for a decent amount of time so that we can see what is actually staying allocated.
Comment 8•10 months ago
|
||
I spent quite a decent amount of time playing around with this today and I haven't been able to reproduce any issues. (I am on Windows though.)
After initial load the memory would settle around 1.0Gb (based on what Task Manager reports). The memory would increase while scrolling but the highest that I ever saw was 1.7Gb which would quickly drop back to about 1.0Gb once I stopped scrolling (and would then go as low as 700Mb if left for an extended time period of time). The memory usage was similar when scrolling to the bottom, copying a value, scrolling back up and searching for that value - memory usage would increase momentarily while I was doing something but would then pretty promptly go back down to the basic 1.0Gb level (eventually settling a bit lower if I left it alone for a while).
Are you still able to reproduce this Henrik?
| Reporter | ||
Comment 9•10 months ago
|
||
Interesting. I'm not able today to reproduce this issue. And I have an older Firefox Nightly from May 13th. Maybe they fixed an issue on their side? I'll keep watching over the next days and keep you posted.
Comment 10•10 months ago
|
||
I wondered about the same thing (if something changed on Google's end) but figured I'd wait to hear back from you first.
I'm going to set the severity low for the moment and then we can cancel if the problem continues to be resolved for you.
Updated•10 months ago
|
| Reporter | ||
Comment 11•9 months ago
|
||
I was still observing the memory when working with this spreadsheet, but I don't see a permanent leak here anymore. Let me close as WFM for now but I will reopen in case the problem comes back.
Description
•