Open Bug 1931634 Opened 15 days ago Updated 4 days ago

Firefox uses ~8GB (or more) to load https://www.w3schools.com/html/html_favicon.asp, Chrome tops out at 2GB

Categories

(Core :: Performance, defect)

Firefox 132
x86_64
Windows 10
defect

Tracking

()

People

(Reporter: jlink, Unassigned)

References

(Blocks 1 open bug)

Details

​​### Basic information

Steps to Reproduce:
Navigate to https://www.w3schools.com/html/html_favicon.asp and scroll around. Then let sit.

Expected Results:
Memory usage would be stable once the page is loaded and similar to Chrome which uses a stable 1.5GB for the page.

Actual Results:
Memory usage (according to Task Manager) will jump by 1.5-2.0GB initially, and then slowly creep upward. Navigating to and away from that page and scrolling around may expedite the memory usage increase.

About:memory shows that the parent process does increase gradually over time, but there are three content processes coming from that page that all use significant amounts of memory, with biggest being w3schools.com which seems to grow without bound. Of note are ~4GB of detached windows and 1.2GB of strings.

Here is the main of the memory report for the w3schools content process:

webIsolated=https://w3schools.com (pid 23644)
Explicit Allocations

7,818.77 MB (100.0%) -- explicit
├──7,021.16 MB (89.80%) -- window-objects
│ ├──4,079.10 MB (52.17%) -- top(none)/detached
│ │ ├──2,928.98 MB (37.46%) -- window(about:srcdoc)
│ │ │ ├──2,857.89 MB (36.55%) -- js-realm(https://www.w3schools.com/html/html_favicon.asp, about:blank)
│ │ │ │ ├──1,824.51 MB (23.33%) -- classes
│ │ │ │ │ ├──1,120.74 MB (14.33%) -- class(Function)/objects
│ │ │ │ │ │ ├──1,065.11 MB (13.62%) ── gc-heap [1096]
│ │ │ │ │ │ └─────55.63 MB (00.71%) ── malloc-heap/slots [1096]
│ │ │ │ │ ├────277.43 MB (03.55%) -- class(Object)/objects
│ │ │ │ │ │ ├──139.37 MB (01.78%) ── gc-heap [1095]
│ │ │ │ │ │ └──138.06 MB (01.77%) ++ malloc-heap
│ │ │ │ │ ├────155.99 MB (02.00%) -- class(Call)/objects
│ │ │ │ │ │ ├──127.23 MB (01.63%) ── gc-heap [1095]
│ │ │ │ │ │ └───28.76 MB (00.37%) ── malloc-heap/slots [1095]
│ │ │ │ │ ├────138.21 MB (01.77%) -- class(Array)/objects
│ │ │ │ │ │ ├───79.96 MB (01.02%) ── gc-heap [1095]
│ │ │ │ │ │ └───58.25 MB (00.75%) ++ malloc-heap
│ │ │ │ │ ├─────80.64 MB (01.03%) ++ class(<non-notable classes>)/objects
│ │ │ │ │ └─────51.50 MB (00.66%) ++ (8 tiny)
│ │ │ │ ├──1,011.82 MB (12.94%) -- scripts
│ │ │ │ │ ├────507.89 MB (06.50%) ── malloc-heap/data [1096]
│ │ │ │ │ └────503.94 MB (06.45%) ── gc-heap [1096]
│ │ │ │ └─────21.57 MB (00.28%) ++ (2 tiny)
│ │ │ └─────71.08 MB (00.91%) ++ (5 tiny)
│ │ ├────955.26 MB (12.22%) -- window(about:blank)
│ │ │ ├──940.33 MB (12.03%) -- js-realm(https://www.w3schools.com/html/html_favicon.asp, about:blank)
│ │ │ │ ├──789.77 MB (10.10%) -- classes
│ │ │ │ │ ├──516.19 MB (06.60%) -- class(Function)/objects
│ │ │ │ │ │ ├──489.87 MB (06.27%) ── gc-heap [2176]
│ │ │ │ │ │ └───26.33 MB (00.34%) ── malloc-heap/slots [2176]
│ │ │ │ │ ├──176.92 MB (02.26%) ++ (7 tiny)
│ │ │ │ │ └───96.66 MB (01.24%) -- class(Call)/objects
│ │ │ │ │ ├──91.26 MB (01.17%) ── gc-heap [1087]
│ │ │ │ │ └───5.40 MB (00.07%) ── malloc-heap/slots [1087]
│ │ │ │ ├──146.17 MB (01.87%) -- scripts
│ │ │ │ │ ├───83.32 MB (01.07%) ── gc-heap [1087]
│ │ │ │ │ └───62.85 MB (00.80%) ── malloc-heap/data [1087]
│ │ │ │ └────4.38 MB (00.06%) ++ (2 tiny)
│ │ │ └───14.93 MB (00.19%) ++ (5 tiny)
│ │ └────194.86 MB (02.49%) -- window(https://www.w3schools.com/html/html_favicon.asp)
│ │ ├──173.48 MB (02.22%) -- js-realm(https://www.w3schools.com/html/html_favicon.asp, about:blank)
│ │ │ ├──121.80 MB (01.56%) ++ classes
│ │ │ └───51.68 MB (00.66%) ++ (3 tiny)
│ │ └───21.39 MB (00.27%) ++ (3 tiny)
│ └──2,942.06 MB (37.63%) -- top(https://www.w3schools.com/html/html_favicon.asp, id=224)
│ ├──2,485.21 MB (31.79%) -- js-zone(0x25da553ea00)
│ │ ├──1,229.46 MB (15.72%) -- strings
│ │ │ ├────795.31 MB (10.17%) ++ (6380 tiny)
│ │ │ └────434.15 MB (05.55%) -- string(length=114031, copies=1985, "function(){var c=['y3DZ','zgvMyxvSDfzPzxC=','C3jJzg9J','u1rzteu=','phrIBd50Ehq9','CgfYzw50rwXLBwvUDa==','zgLZCgXHEq==','jfDmwfjTqwq=','v2vIr0WYuMvUzgvYAw5Nq29UDgv4Da==','t0jo','y3bT','w0vFrLjDia==','r0vu','BwfSDMvYDgLZAw5Nx3bVyW==','yxbWlwjHBM5LCG==','ic8Grevwmu9h','uKztsa==','CMvMCMvZAcbB','cIaGicbHDcbHyM91DdPIBgfUAZO=','zgf0ys1LBMmTC2nYAxb0','C291CMnL','CxvLCNLtzwXLy3rVCKfSBa==','Bxv0zwq=','CMvZCg9UC2vvuKW=','sfrntfnJCMLWDevSzw1LBNq=','DxDW','y29UDgfPBNm=','C2HVDwXKlwjSB2nR','zgv0ywLSCW==','y2fSBa==','lKLUAMvJDgvK','v2LUzg93lMXVy2f0Aw9U','Cg9ZAxrPB24=','wfbnlKy=','lcbUBY13BMqTzxzHBdOG','BMf2AwDHDgLVBG==','DhjHy2vK','zNjHBwvtCMm=','C3jJ','lK9vvejsquLow2rHDgeTD2LKz2v0lwLKxq==','tM9Kzq==','C2vZC2LVBKLK','zg9JDw1LBNrfBgvTzw50','yxbPvMvYC2LVBLn1zMzPEa==','z2v0rw50CMLLC0j5tMfTzq==','v1nytYaVia==','y2XHC3nmAxn0','ywrK','ywXSB3CTDg9Wlw5HDMLNyxrPB24=','y2HJzha=','CMjVEa==','Ahr0Chm6lY9ZBwvHz29SlNjLDMnVBNrLBNq=','zxjYB3jtDhjPBMC=','ChjLCgvUza==','B25LCNjVCG==','y3jLyxrLrwXLBwvUDa==','yMrFDa==','y2fSBcb0BYbLDMfSkcKGy" (truncated))
│ │ │ ├──434.11 MB (05.55%) -- malloc-heap
│ │ │ │ ├──434.00 MB (05.55%) ── two-byte
│ │ │ │ └────0.11 MB (00.00%) ── latin1
│ │ │ └────0.05 MB (00.00%) ++ gc-heap
│ │ ├────664.08 MB (08.49%) -- scopes
│ │ │ ├──410.41 MB (05.25%) ── malloc-heap
│ │ │ └──253.68 MB (03.24%) ── gc-heap
│ │ ├────135.01 MB (01.73%) ++ (13 tiny)
│ │ ├────134.36 MB (01.72%) ++ property-maps
│ │ ├────128.99 MB (01.65%) ── unused-gc-things
│ │ ├─────97.02 MB (01.24%) ── getter-setters-gc-heap
│ │ └─────96.28 MB (01.23%) -- shapes
│ │ ├──96.28 MB (01.23%) -- gc-heap
│ │ │ ├──79.68 MB (01.02%) ── shared
│ │ │ └──16.60 MB (00.21%) ++ (2 tiny)
│ │ └───0.00 MB (00.00%) ── malloc-heap/shape-cache
│ └────456.85 MB (05.84%) -- active
│ ├──414.47 MB (05.30%) -- window(https://www.w3schools.com/html/html_favicon.asp)
│ │ ├──294.23 MB (03.76%) -- js-realm(https://www.w3schools.com/html/html_favicon.asp)
│ │ │ ├──287.07 MB (03.67%) -- classes
│ │ │ │ ├──129.71 MB (01.66%) -- class(Array)/objects
│ │ │ │ │ ├──126.82 MB (01.62%) ── gc-heap
│ │ │ │ │ └────2.89 MB (00.04%) ++ malloc-heap
│ │ │ │ ├──103.02 MB (01.32%) -- class(Object)/objects
│ │ │ │ │ ├───80.06 MB (01.02%) ── gc-heap
│ │ │ │ │ └───22.96 MB (00.29%) ++ malloc-heap
│ │ │ │ └───54.34 MB (00.70%) ++ (23 tiny)
│ │ │ └────7.16 MB (00.09%) ++ (6 tiny)
│ │ ├──104.68 MB (01.34%) -- dom
│ │ │ ├──100.36 MB (01.28%) ── orphan-nodes [3]
│ │ │ └────4.32 MB (00.06%) ++ (7 tiny)
│ │ └───15.56 MB (00.20%) ++ (3 tiny)
│ └───42.38 MB (00.54%) ++ (2 tiny)
├────382.78 MB (04.90%) ── heap-unclassified
├────329.60 MB (04.22%) -- js-non-window
│ ├──186.74 MB (02.39%) -- zones
│ │ ├──168.60 MB (02.16%) -- zone(0x25da553ea00)
│ │ │ ├──168.10 MB (02.15%) -- realm([Expanded Principal [https://www.w3schools.com/html/html_favicon.asp, moz-extension://af0ba7f7-94c3-478f-be72-8d36718aa9e7/]], Content Script "1Password Password Manager" (ID: {d634138d-c276-4fc8-924b-40a0ea21d284}, moz-extension://af0ba7f7-94c3-478f-be72-8d36718aa9e7/))
│ │ │ │ ├──110.62 MB (01.41%) ++ classes
│ │ │ │ └───57.48 MB (00.74%) ++ (2 tiny)
│ │ │ └────0.51 MB (00.01%) ++ (2 tiny)
│ │ └───18.14 MB (00.23%) ++ (3 tiny)
│ └──142.86 MB (01.83%) ++ (3 tiny)
└─────85.23 MB (01.09%) ++ (24 tiny)

It seems that without ETP this site just continually rotates ads, and for some reason we never unlink them, leading to many many windows hanging around (based on the devtools memory pane's dominators view)

Hmm, 168.10 MB for "1Password Password Manager" realm is a_lot. But maybe it just allocates more for each (detached) window and the issue is that window objects aren't released.

For me that page creates 13 different processes. The main one uses ~80MB. And others seems to be iframes for tracking and ads, each of them using ~8MB.
I wonder if I get different ads here.

I tried this out again yesterday/today (after having been on vacation for a week) and here is what I'm seeing:

  1. Prior to opening that page, Task Manager showed ~6GB of memory usage by Firefox (I'm guessing that I have ~100 tabs open, many inactive though). The parent process was using 670MB.
  2. After opening the page and scrolling around on it for a short period of time, the Task Manager memory usage went up to 7.xGB, the parent process went up to 900MB, and the w3schools content process was at 550MB.
  3. Going back and forth between the memory report tabs, the tab with this bug, and the page in question, my memory usage continued to slowly creep upward for somewhere between 30 and 60 minutes yesterday - the content process got to 1.2GB, the w3school process was at 1.5GB, and Task Manager was reporting 8-8.5GB of usage.
  4. Leaving overnight and checking back this morning, Task Manager reported ~18GB of memory usage and, checking a new memory report, the parent process was at 1.4GB and the w3schools process is at 6.8GB, with 5.7GB in window-objects and ~3.4GB in detached windows.

Since that high of 18GB earlier this morning, Task Manager is reporting 12-13GB of memory usage by Firefox, and that will start creeping up when I switch over to the tab with this page.

So I does seem like the problem is still definitely happening for me. It does require a little bit of patience though.

You need to log in before you can comment on or make changes to this bug.