Currently inside the ContentHider we're running a lot of Hooks (which read context, loop through stuff, create intermediate object, memoize them, and so on). However, none of those values are used if there's no actual blurring.
I'm splitting the component in two. The top part is a fast path if there's no blurring.
Note that this means that if the "has blur" condition flips somehow while the component is onscreen (is this possible?), the state of the inner component will reinintialize from scratch. I'm not sure whether this is an issue.
Test Plan
Verify both blurred and non-blurred posts show up. (You'll need to find some posts that are blurred under your settings.)
Before
The ContentHider self-time shows up in traces:
After
The ContentHider self-time doesn't show up in traces:
Currently inside the
ContentHider
we're running a lot of Hooks (which read context, loop through stuff, create intermediate object, memoize them, and so on). However, none of those values are used if there's no actual blurring.I'm splitting the component in two. The top part is a fast path if there's no blurring.
Note that this means that if the "has blur" condition flips somehow while the component is onscreen (is this possible?), the state of the inner component will reinintialize from scratch. I'm not sure whether this is an issue.
Test Plan
Verify both blurred and non-blurred posts show up. (You'll need to find some posts that are blurred under your settings.)
Before
The
ContentHider
self-time shows up in traces:After
The
ContentHider
self-time doesn't show up in traces: