Opening a 300MB Chrome profile in Firefox profiler spends a lot of time around GCMinor
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
Open a 300MB Google Chrome profile in Firefox profiler
Profile of opening the Chrome profile: https://share.firefox.dev/3Oy7p7Y
This may be the expected behaviour or good enough behaviour. Feel free to resolve as invalid.
Reporter | ||
Comment 1•2 years ago
|
||
chrome trace part1
Reporter | ||
Comment 2•2 years ago
|
||
Chrome trace part2
Reporter | ||
Comment 3•2 years ago
|
||
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
The JSON parser parser is creating a lot of nursery objects which all end up tenured. We could probably do the same thing we just did for structured clone deserialisation and stop allocating in the nursery after the first nursery collection.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
The patch adds a nursery collection callback for the duration of parsing and
counts the collections. After the second collection we switch to allocating
everything in the tenured heap.
JSON parsing allocates from the leaves of the tree upwards, unlike structured
clone deserialization which works from the root downwards. Because of this it
doesn't always make sense to stop nursery allocation after the first
collection, as this doesn't doom the whole data structure to being tenured. We
don't know ahead of time how big the resulting data structure will be but after
two nursery collections then at least half of it will end up tenured.
This change made parsing the JSON data in the bug significantly faster.
Comment 7•2 years ago
|
||
bugherder |
Reporter | ||
Comment 8•2 years ago
|
||
Profile: https://share.firefox.dev/45fgTvY
So 12.6seconds -> 5.2 seconds
Time spent in GCMinor is all but gone (except in a few places). This is a nice improvement, thanks!
Description
•