React updates can trigger lots of GC activity
Categories
(Core :: JavaScript: GC, defect, P5)
Tracking
()
Performance Impact | low |
People
(Reporter: jonco, Unassigned)
References
(Depends on 2 open bugs)
Details
(Keywords: perf:responsiveness)
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Regarding the GC, The keyd profiles in particular still show quite a lot of objects being allocated directly into the tenured heap (30-60%), and a high tenure rate from the nursery (80%!!). (We didn't have all this data in the profiler last time I looked.) So my queries about something being pretenured or just some allocations always going to the tenured heap are still valid.
Last time I looked at this bug it looked as if it was one of the promise objects that was skipping the nursery, but I'm still not sure.
So if it's barriers being triggered when tenured->nursery pointers are created/set then looking at the profile it might be updating HTML tables, or setting onclick handlers, those are the two situations that I see.
Because I don't know web programming, my next question is will React build up real dom structures that arn't linked into the current document, and then link them in once it knows it wants to keep them?, that could be a problem, but I don't think it does that, isn't that what vdom is for?
Or one of these things that tables or onclick sometimes points to is being pretenured (something we may be able to action).
Comment 15•6 years ago
|
||
I can't run the benchmarks locally.
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /frameworks/react-v16.1.0-keyed/" "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /css/currentStyle.css" "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /frameworks/react-v16.1.0-keyed/dist/main.js" "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /frameworks/react-v16.1.0-keyed/dist/main.js" Error (404): "Not found"
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /css/bootstrap/dist/css/bootstrap.min.css" "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /css/main.css" "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
[Thu Feb 14 2019 16:43:02 GMT+1100 (AEDT)] "GET /favicon.ico" "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
Comment 16•6 years ago
|
||
Everything works fine for me while following the instructions in this document: https://docs.google.com/document/d/17sCEntVKQNbbz_8iOwkVm-UTIu9KeOkrojA0UVCiJxg/edit#heading=h.21galjx4ds7a
Make sure you follow all steps (Step 1, Step 2, Step 3).
Comment 17•6 years ago
|
||
Did you manage to run the benchmarks Paul? Anything more I can help with?
Comment 18•6 years ago
|
||
oops, sorry this slipped. I'll look today or tomorrow (hopefully).
Updated•4 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Description
•