-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track event times per lane on the root #19387
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6a2703c:
|
Details of bundled changes.Comparing: faa697f...6a2703c react-dom
react-art
react-native-renderer
react-reconciler
react-test-renderer
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (experimental) |
Details of bundled changes.Comparing: faa697f...6a2703c react-dom
react-art
react-reconciler
react-test-renderer
react-native-renderer
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (stable) |
Old fork tests are failing because I forgot to sync changes to ReactFiberRoot.old. Will fix in a bit. |
a478883
to
1327c6b
Compare
let lanes = noLongerPendingLanes; | ||
while (lanes > 0) { | ||
const index = pickArbitraryLaneIndex(lanes); | ||
const lane = 1 << index; | ||
|
||
// Clear the expiration time | ||
entanglements[index] = NoLanes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was an oversight from when I added the entanglement feature. It's theoretically observable but if I write a test it'll be super convoluted, since we currently only use entanglement for useMutableSource, and only in a particular de-opt case.
1327c6b
to
4b3c097
Compare
Some minor rearranging so that eventTime gets threaded through. No change in behavior.
Previous strategy was to store the event time on the update object and accumulate the most recent one during the render phase. Among other advantages, by tracking them on the root, we can read the event time before the render phase has finished. I haven't removed the `eventTime` field from the update object yet, because it's still used to compute the timeout. Tracking the timeout on the root is my next step.
4b3c097
to
6a2703c
Compare
Previous strategy was to store the event time on the update object and accumulate the most recent one during the render phase.
Among other advantages, by tracking them on the root, we can read the event time before the render phase has finished.
I haven't removed the
eventTime
field from the update object yet, because it's still used to compute the timeout. Tracking the timeout on the root is my next step.