react/scripts/rollup/validate
Andrew Clark 4a1072194f
Memoize promise listeners to prevent exponential growth (#14429)
* Memoize promise listeners to prevent exponential growth

Previously, React would attach a new listener every time a promise is
thrown, regardless of whether the same listener was already attached
during a previous render. Because React attempts to render every time
a promise resolves, the number of listeners grows quickly.

This was especially bad in synchronous mode because the renders that
happen when the promise pings are not batched together. So if a single
promise has multiple listeners for the same root, there will be multiple
renders, which in turn results in more listeners being added to the
remaining unresolved promises. This results in exponential growth in
the number of listeners with respect to the number of IO-bound
components in a single render.

Fixes #14220

* Memoize on the root and Suspense fiber instead of on the promise

* Add TODO to fix persistent mode tests
2018-12-14 11:03:23 -08:00
..
eslintignore Jest + test renderer helpers for concurrent mode (#13751) 2018-10-03 18:37:41 -06:00
eslintrc.cjs.js Memoize promise listeners to prevent exponential growth (#14429) 2018-12-14 11:03:23 -08:00
eslintrc.fb.js Memoize promise listeners to prevent exponential growth (#14429) 2018-12-14 11:03:23 -08:00
eslintrc.rn.js Memoize promise listeners to prevent exponential growth (#14429) 2018-12-14 11:03:23 -08:00
eslintrc.umd.js Memoize promise listeners to prevent exponential growth (#14429) 2018-12-14 11:03:23 -08:00
index.js Fork React Native renderer into FB and OSS bundles (#12625) 2018-04-18 13:16:50 -07:00