Open Bug 1954006 Opened 1 year ago Updated 1 year ago

Testcase generating N Weakref objects is 4x slowr and uses 4x more RAM.

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached file Generate Weakrefs.HTML —

Open attached testcase
N=5000000
Firefox: https://share.firefox.dev/41RHA9y (12s, 1.2GB)
Chrome: https://share.firefox.dev/3RfqDAV (3.5s, 300mb)

Testcase is extremely artificial. No ides if performance of Weakrefs is important.

27% of time spent in JS::Zone::traceKeptObjects. We could implement this using a generation count rather than an explicit set which is what I think JSC does. I'm not sure why the memory use is so much higher.

Profile with JS and Native memory tracking if it helps: https://share.firefox.dev/3XT4Z9o

Severity: -- → N/A
Priority: -- → P3
Blocks: 1980560
See Also: 1943230 →

Latest profile: https://share.firefox.dev/4oT5YSY (10s to generate, 1.5s to deref, 800MB memory use)

There are some changes coming in bug 1984091 that will affect this. Hopefully for the better (there will be fewer objects created at least).

https://share.firefox.dev/3Ka1bwr (8s to generate, 1.4s to deref, 1GB memory)
There are also these grey bits that use CPU without seemingly doing anything.

This is with the parallel threshold set to 1MB.
https://share.firefox.dev/48TwFzE
Notice that the third area is not parallel, all the rest are.

Summary: Testcase generating N Wekref objects is 4x slowr and uses 4x more RAM. → Testcase generating N Weakref objects is 4x slowr and uses 4x more RAM.
See Also: → 1987291
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: