Skip to content
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

Traverse commit phase effects iteratively #20094

Merged
merged 2 commits into from Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,350 changes: 1,224 additions & 126 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js

Large diffs are not rendered by default.

510 changes: 13 additions & 497 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/shared/ReactFeatureFlags.js
Expand Up @@ -136,3 +136,5 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;

export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.native-fb.js
Expand Up @@ -53,6 +53,8 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.native-oss.js
Expand Up @@ -52,6 +52,8 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.test-renderer.js
Expand Up @@ -52,6 +52,8 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
Expand Up @@ -52,6 +52,8 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
Expand Up @@ -52,6 +52,8 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.testing.js
Expand Up @@ -52,6 +52,8 @@ export const enableDiscreteEventFlushingChange = false;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.testing.www.js
Expand Up @@ -52,6 +52,8 @@ export const enableDiscreteEventFlushingChange = true;
export const enableDoubleInvokingEffects = false;
export const enableUseRefAccessWarning = false;

export const enableRecursiveCommitTraversal = false;

// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.www.js
Expand Up @@ -84,6 +84,8 @@ export const enableDiscreteEventFlushingChange = true;
// to the correct value.
export const enableNewReconciler = __VARIANT__;

export const enableRecursiveCommitTraversal = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be either true or in the dynamic values?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this comment #20094 (comment)

Andrew's plan was to split iterative and recursive between old and new forks (once we merge the new fork into the old). For now, we're turning on iterative only for the new build (to see if that fixes the top line metrics).

Does make me a little uneasy that we don't have automated tests covering the new + recursive combination, but if we're able to merge new -> old soon, hopefully it's ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah ignore me, I'm a clown. This forces iterative mode which is what we want.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, we're both clowns. I also had the same initial thought, b'c intuitively I think of the feature flag enabling the new thing :)


// Flow magic to verify the exports of this file match the original version.
// eslint-disable-next-line no-unused-vars
type Check<_X, Y: _X, X: Y = _X> = null;
Expand Down