Open Bug 1947756 Opened 9 months ago Updated 3 months ago

73% tenuring rate on modified Codepen Demo (https://codepen.io/Mikhail-Bespalov/pen/dPyyZed?editors=1010), and Firefox uses 800MB-1.2GB RAM. Chrome uses 200MB

Categories

(Core :: JavaScript: GC, task, P2)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Open the attached testcase (original at https://codepen.io/Mikhail-Bespalov/pen/dPyyZed?editors=1010. I changed the code so that the minimum grid size is 1)
Slide the grid-size slider all the way to the left ("1" value)

AR: https://share.firefox.dev/41dekuQ

We use 800MB-1.2gb RAM. Chrome takes 200MB.

Attached file index.html

It looks like we have a huge number of very small nursery GCs that look like this:

Reason: NURSERY_MALLOC_BUFFERS
Bytes tenured: 192B / 280B (69%)
Cells tenured: 3.0 / 5.0 (60%)
Bytes used: 280B / 256KB (0.1%)
Nursery allocations since last minor GC: 5.0 / 9.0 (56%)

Looking at the code, I think we're allocating a big Float32Array in generateHalftone every frame, so we're hitting our mallocedBufferBytes capacity very quickly.

Component: JavaScript Engine → JavaScript: GC

We don't resize the nursery based on malloc bytes usage in the same way as we do for space used in the nursery itself. This would likely help here.

Severity: -- → N/A
Priority: -- → P2
Summary: 69% tenuring rate on modified Codepen Demo (https://codepen.io/Mikhail-Bespalov/pen/dPyyZed?editors=1010), and Firefox uses 800MB-1.2GB RAM. Chrome uses 200MB → 73% tenuring rate on modified Codepen Demo (https://codepen.io/Mikhail-Bespalov/pen/dPyyZed?editors=1010), and Firefox uses 800MB-1.2GB RAM. Chrome uses 200MB

(In reply to Jon Coppeard (:jonco) from comment #3)

We don't resize the nursery based on malloc bytes usage in the same way as we do for space used in the nursery itself. This would likely help here.

Worth filing a bug for posterity?

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

Attachment

General

Creator:
Created:
Updated:
Size: