Fix Suspense throttling mechanism (#26802)

Summary:
The throttling mechanism for fallbacks should apply to both their
appearance _and_ disappearance.

This was mostly addressed by #26611. See that PR for additional context.

However, a flaw in the implementation is that we only update the the
timestamp used for throttling when the fallback initially appears. We
don't update it when the real content pops in. If lots of content in
separate Suspense trees loads around the same time, you can still get
jank.

The issue is fixed by updating the throttling timestamp whenever the
visibility of a fallback changes. Not just when it appears.

DiffTrain build for commit 4bfcd02b2c.

Reviewed By: hoxyq

Differential Revision: D45920350

Pulled By: sammy-SC

fbshipit-source-id: f5df1709a66e8014d4458fdfdf960d58e0acc45f
This commit is contained in:
acdlite 2023-05-24 14:51:20 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 7819fef988
Коммит 40dbf19b4b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1 +1 @@
4cd7065665ea2cf33c306265c8d817904bb401ca
4bfcd02b2cebcb390f5aff0d7747c60a55012d5d