(very large array) Parallel marking is not being used in this demo despite 100ms+ marking slices
Categories
(Core :: JavaScript: GC, enhancement, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files, 1 obsolete file)
I have modified the original testcase at https://github.com/cceckman/fiona
I changed the following :
Unmodified: let count = Math.round(canvas.height * canvas.width * load)
Modified: let count = 1000000 *Math.round(canvas.height * canvas.width * load)
Open the attached modified testcase
AR: https://share.firefox.dev/42vJZJe
See that there is no use of background parallel threads to do marking
| Reporter | ||
Comment 1•11 months ago
|
||
Unzip and use this.
| Reporter | ||
Updated•11 months ago
|
| Reporter | ||
Comment 2•11 months ago
•
|
||
You can reduce the multiplication factor by 10 to test because the current value leads to OOM very quickly.
Alternately, try opening the testcase in a background tab. That seems to slowdown the memory increase.
| Reporter | ||
Comment 3•11 months ago
|
||
| Reporter | ||
Comment 4•11 months ago
|
||
If you reduce the javascript.options.mem.gc_parallel_marking_threshold_mb = 1 , then we do see some parallel marking. Though the number of thread used is 1, despite me setting it to 8.
| Reporter | ||
Updated•11 months ago
|
Comment 5•11 months ago
|
||
There are two things here.
Firstly the testcase has a few very large arrays. We don't parallelise marking of individual arrays. It might be possible to do this with some extra work but it's not that likely to pay off since I think cases like this are fairly rare for normal web content.
Secondly the fact that we don't use parallel marking for this case with current settings is because the memory threshold is based on GC heap usage which doesn't count the contents of the arrays. We can fix that fairly simply.
Comment 6•11 months ago
•
|
||
After looking at the profiles, we spend more time in GC with parallel marking running. This is because this case doesn't actually parallelise at the moment.
Updated•11 months ago
|
Description
•