-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
Profiling bundles for www and fbsource #13112
Conversation
Details of bundled changes.Comparing: 71a60dd...c8d3df2 react-dom
react-art
react-native-renderer
Generated by 🚫 dangerJS |
Comparing the build results between master and this branch confirms that two new renderer builds, There were no changes to e.g.
diff /Users/bvaughn/Desktop/builds/master/facebook-www/React-dev.js /Users/bvaughn/Desktop/builds/branch/facebook-www/React-dev.js
71d70
< var enableProfilerTimer = _require.enableProfilerTimer;
diff /Users/bvaughn/Desktop/builds/master/facebook-www/ReactART-dev.js /Users/bvaughn/Desktop/builds/branch/facebook-www/ReactART-dev.js
817d816
< var enableProfilerTimer = _require$1.enableProfilerTimer;
828a828,829
> var enableProfilerTimer = true;
>
diff /Users/bvaughn/Desktop/builds/master/facebook-www/ReactART-prod.js /Users/bvaughn/Desktop/builds/branch/facebook-www/ReactART-prod.js
313,314c313
< enableGetDerivedStateFromCatch = _require$1.enableGetDerivedStateFromCatch,
< enableProfilerTimer = _require$1.enableProfilerTimer;
---
> enableGetDerivedStateFromCatch = _require$1.enableGetDerivedStateFromCatch;
417d415
< var isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
431,432d428
< enableProfilerTimer &&
< (this.treeBaseTime = this.selfBaseTime = this.actualStartTime = this.actualDuration = 0);
451,454c447
< (workInProgress.lastEffect = null),
< enableProfilerTimer &&
< ((workInProgress.actualDuration = 0),
< (workInProgress.actualStartTime = 0)));
---
> (workInProgress.lastEffect = null));
463,465d455
< enableProfilerTimer &&
< ((workInProgress.selfBaseTime = current.selfBaseTime),
< (workInProgress.treeBaseTime = current.treeBaseTime));
891,907d880
< var commitTime = 0,
< timerPausedAt = 0,
< totalElapsedPauseTime = 0;
< function recordElapsedActualRenderTime(fiber) {
< enableProfilerTimer &&
< (fiber.actualDuration =
< now$1() - totalElapsedPauseTime - fiber.actualDuration);
< }
< function resumeActualRenderTimerIfPaused() {
< enableProfilerTimer &&
< 0 < timerPausedAt &&
< ((totalElapsedPauseTime += now$1() - timerPausedAt), (timerPausedAt = 0));
< }
< var baseStartTime = -1;
< function stopBaseRenderTimerIfRunning() {
< enableProfilerTimer && (baseStartTime = -1);
< }
1839,1843c1812,1817
< !didCaptureError ||
< (enableGetDerivedStateFromCatch &&
< "function" === typeof ctor.getDerivedStateFromCatch)
< ? (ctor = shouldUpdate.render())
< : ((ctor = null), enableProfilerTimer && stopBaseRenderTimerIfRunning());
---
> ctor =
> !didCaptureError ||
> (enableGetDerivedStateFromCatch &&
> "function" === typeof ctor.getDerivedStateFromCatch)
> ? shouldUpdate.render()
> : null;
2001d1974
< enableProfilerTimer && stopBaseRenderTimerIfRunning();
2026,2031d1998
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< enableProfilerTimer &&
< ((workInProgress.actualDuration =
< now$1() - workInProgress.actualDuration - totalElapsedPauseTime),
< (workInProgress.actualStartTime = now$1()));
2036d2002
< enableProfilerTimer && stopBaseRenderTimerIfRunning();
2465d2430
< enableProfilerTimer && (workInProgress.effectTag |= 4),
2533,2535d2497
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< recordElapsedActualRenderTime(workInProgress);
2916,2925d2877
< enableProfilerTimer &&
< ((instance = finishedWork.memoizedProps.onRender),
< instance(
< finishedWork.memoizedProps.id,
< null === current ? "mount" : "update",
< finishedWork.actualDuration,
< finishedWork.treeBaseTime,
< finishedWork.actualStartTime,
< commitTime
< ));
3100,3102d3051
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< recordElapsedActualRenderTime(workInProgress);
3156,3159d3104
< enableProfilerTimer &&
< interruptedWork$jscomp$0.mode & 4 &&
< (resumeActualRenderTimerIfPaused(),
< recordElapsedActualRenderTime(interruptedWork$jscomp$0));
3209,3225c3154,3159
< if (enableProfilerTimer && workInProgress.mode & 4) {
< updateQueue = workInProgress.selfBaseTime;
< for (var child = workInProgress.child; null !== child; )
< (updateQueue += child.treeBaseTime),
< 0 !== child.expirationTime &&
< (0 === newExpirationTime ||
< newExpirationTime > child.expirationTime) &&
< (newExpirationTime = child.expirationTime),
< (child = child.sibling);
< workInProgress.treeBaseTime = updateQueue;
< } else
< for (updateQueue = workInProgress.child; null !== updateQueue; )
< 0 !== updateQueue.expirationTime &&
< (0 === newExpirationTime ||
< newExpirationTime > updateQueue.expirationTime) &&
< (newExpirationTime = updateQueue.expirationTime),
< (updateQueue = updateQueue.sibling);
---
> for (updateQueue = workInProgress.child; null !== updateQueue; )
> 0 !== updateQueue.expirationTime &&
> (0 === newExpirationTime ||
> newExpirationTime > updateQueue.expirationTime) &&
> (newExpirationTime = updateQueue.expirationTime),
> (updateQueue = updateQueue.sibling);
3263,3275c3197,3202
< var current = workInProgress.alternate;
< enableProfilerTimer
< ? (workInProgress.mode & 4 &&
< enableProfilerTimer &&
< (baseStartTime = now$1()),
< (current = beginWork(current, workInProgress, nextRenderExpirationTime)),
< workInProgress.mode & 4 &&
< (enableProfilerTimer &&
< -1 !== baseStartTime &&
< (workInProgress.selfBaseTime = now$1() - baseStartTime),
< stopBaseRenderTimerIfRunning()))
< : (current = beginWork(current, workInProgress, nextRenderExpirationTime));
< null === current && (current = completeUnitOfWork(workInProgress));
---
> var next = beginWork(
> workInProgress.alternate,
> workInProgress,
> nextRenderExpirationTime
> );
> null === next && (next = completeUnitOfWork(workInProgress));
3277c3204
< return current;
---
> return next;
3299c3226
< if (isYieldy) {
---
> if (isYieldy)
3302,3306c3229
< enableProfilerTimer &&
< enableProfilerTimer &&
< 0 === timerPausedAt &&
< (timerPausedAt = now$1());
< } else
---
> else
3310,3314c3233
< if (
< (enableProfilerTimer && stopBaseRenderTimerIfRunning(),
< null === nextUnitOfWork)
< )
< (didFatal = !0), onUncaughtError(thrownValue);
---
> if (null === nextUnitOfWork) (didFatal = !0), onUncaughtError(thrownValue);
3612d3530
< enableProfilerTimer && resumeActualRenderTimerIfPaused();
3676,3680c3594
< ? ((root.finishedWork = isYieldy),
< enableProfilerTimer &&
< enableProfilerTimer &&
< 0 === timerPausedAt &&
< (timerPausedAt = now$1()))
---
> ? (root.finishedWork = isYieldy)
3786d3699
< enableProfilerTimer && enableProfilerTimer && (commitTime = now$1());
3934d3846
< enableProfilerTimer && enableProfilerTimer && (totalElapsedPauseTime = 0);
4079,4090c3991,4000
< var _props = this.props;
< _props = this._surface = Mode.Surface(
< +_props.width,
< +_props.height,
< this._tagRef
< );
< var uninitializedFiber = 0;
< enableProfilerTimer && isDevToolsPresent && (uninitializedFiber |= 4);
< uninitializedFiber = new FiberNode(3, null, null, uninitializedFiber);
< _props = {
< current: uninitializedFiber,
< containerInfo: _props,
---
> var _props = this.props,
> containerInfo = (this._surface = Mode.Surface(
> +_props.width,
> +_props.height,
> this._tagRef
> ));
> _props = new FiberNode(3, null, null, 0);
> containerInfo = {
> current: _props,
> containerInfo: containerInfo,
4108c4018
< this._mountNode = uninitializedFiber.stateNode = _props;
---
> this._mountNode = _props.stateNode = containerInfo;
diff /Users/bvaughn/Desktop/builds/master/facebook-www/ReactDOM-dev.js /Users/bvaughn/Desktop/builds/branch/facebook-www/ReactDOM-dev.js
464d463
< var enableProfilerTimer = _require.enableProfilerTimer;
475a475,476
> var enableProfilerTimer = true;
>
diff /Users/bvaughn/Desktop/builds/master/facebook-www/ReactDOM-prod.js /Users/bvaughn/Desktop/builds/branch/facebook-www/ReactDOM-prod.js
235d234
< enableProfilerTimer = _require.enableProfilerTimer,
3600d3598
< var isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
3635,3636d3632
< enableProfilerTimer &&
< (this.treeBaseTime = this.selfBaseTime = this.actualStartTime = this.actualDuration = 0);
3655,3658c3651
< (workInProgress.lastEffect = null),
< enableProfilerTimer &&
< ((workInProgress.actualDuration = 0),
< (workInProgress.actualStartTime = 0)));
---
> (workInProgress.lastEffect = null));
3667,3669d3659
< enableProfilerTimer &&
< ((workInProgress.selfBaseTime = current.selfBaseTime),
< (workInProgress.treeBaseTime = current.treeBaseTime));
3758,3760c3748
< isAsync = isAsync ? 3 : 0;
< enableProfilerTimer && isDevToolsPresent && (isAsync |= 4);
< isAsync = new FiberNode(3, null, null, isAsync);
---
> isAsync = new FiberNode(3, null, null, isAsync ? 3 : 0);
4132,4148d4119
< var commitTime = 0,
< timerPausedAt = 0,
< totalElapsedPauseTime = 0;
< function recordElapsedActualRenderTime(fiber) {
< enableProfilerTimer &&
< (fiber.actualDuration =
< now$1() - totalElapsedPauseTime - fiber.actualDuration);
< }
< function resumeActualRenderTimerIfPaused() {
< enableProfilerTimer &&
< 0 < timerPausedAt &&
< ((totalElapsedPauseTime += now$1() - timerPausedAt), (timerPausedAt = 0));
< }
< var baseStartTime = -1;
< function stopBaseRenderTimerIfRunning() {
< enableProfilerTimer && (baseStartTime = -1);
< }
5109,5113c5080,5085
< !didCaptureError ||
< (enableGetDerivedStateFromCatch &&
< "function" === typeof ctor.getDerivedStateFromCatch)
< ? (ctor = shouldUpdate.render())
< : ((ctor = null), enableProfilerTimer && stopBaseRenderTimerIfRunning());
---
> ctor =
> !didCaptureError ||
> (enableGetDerivedStateFromCatch &&
> "function" === typeof ctor.getDerivedStateFromCatch)
> ? shouldUpdate.render()
> : null;
5272d5243
< enableProfilerTimer && stopBaseRenderTimerIfRunning();
5297,5302d5267
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< enableProfilerTimer &&
< ((workInProgress.actualDuration =
< now$1() - workInProgress.actualDuration - totalElapsedPauseTime),
< (workInProgress.actualStartTime = now$1()));
5308d5272
< enableProfilerTimer && stopBaseRenderTimerIfRunning();
5769d5732
< enableProfilerTimer && (workInProgress.effectTag |= 4),
5839,5841d5801
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< recordElapsedActualRenderTime(workInProgress);
6256,6265d6215
< enableProfilerTimer &&
< ((instance = finishedWork.memoizedProps.onRender),
< instance(
< finishedWork.memoizedProps.id,
< null === current ? "mount" : "update",
< finishedWork.actualDuration,
< finishedWork.treeBaseTime,
< finishedWork.actualStartTime,
< commitTime
< ));
6440,6442d6389
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< recordElapsedActualRenderTime(workInProgress);
6499,6502d6445
< enableProfilerTimer &&
< interruptedWork$jscomp$0.mode & 4 &&
< (resumeActualRenderTimerIfPaused(),
< recordElapsedActualRenderTime(interruptedWork$jscomp$0));
6553,6569c6496,6501
< if (enableProfilerTimer && workInProgress.mode & 4) {
< updateQueue = workInProgress.selfBaseTime;
< for (var child = workInProgress.child; null !== child; )
< (updateQueue += child.treeBaseTime),
< 0 !== child.expirationTime &&
< (0 === newExpirationTime ||
< newExpirationTime > child.expirationTime) &&
< (newExpirationTime = child.expirationTime),
< (child = child.sibling);
< workInProgress.treeBaseTime = updateQueue;
< } else
< for (updateQueue = workInProgress.child; null !== updateQueue; )
< 0 !== updateQueue.expirationTime &&
< (0 === newExpirationTime ||
< newExpirationTime > updateQueue.expirationTime) &&
< (newExpirationTime = updateQueue.expirationTime),
< (updateQueue = updateQueue.sibling);
---
> for (updateQueue = workInProgress.child; null !== updateQueue; )
> 0 !== updateQueue.expirationTime &&
> (0 === newExpirationTime ||
> newExpirationTime > updateQueue.expirationTime) &&
> (newExpirationTime = updateQueue.expirationTime),
> (updateQueue = updateQueue.sibling);
6628,6638c6560
< enableProfilerTimer
< ? (workInProgress.mode & 4 &&
< enableProfilerTimer &&
< (baseStartTime = now$1()),
< (current = beginWork(current, workInProgress, nextRenderExpirationTime)),
< workInProgress.mode & 4 &&
< (enableProfilerTimer &&
< -1 !== baseStartTime &&
< (workInProgress.selfBaseTime = now$1() - baseStartTime),
< stopBaseRenderTimerIfRunning()))
< : (current = beginWork(current, workInProgress, nextRenderExpirationTime));
---
> current = beginWork(current, workInProgress, nextRenderExpirationTime);
6669c6591
< if (isYieldy) {
---
> if (isYieldy)
6672,6676c6594
< enableProfilerTimer &&
< enableProfilerTimer &&
< 0 === timerPausedAt &&
< (timerPausedAt = now$1());
< } else
---
> else
6680,6684c6598
< if (
< (enableProfilerTimer && stopBaseRenderTimerIfRunning(),
< null === nextUnitOfWork)
< )
< (didFatal = !0), onUncaughtError(thrownValue);
---
> if (null === nextUnitOfWork) (didFatal = !0), onUncaughtError(thrownValue);
7031d6944
< enableProfilerTimer && resumeActualRenderTimerIfPaused();
7120,7124c7033
< ? ((root.finishedWork = isYieldy),
< enableProfilerTimer &&
< enableProfilerTimer &&
< 0 === timerPausedAt &&
< (timerPausedAt = now$1()))
---
> ? (root.finishedWork = isYieldy)
7320d7228
< enableProfilerTimer && enableProfilerTimer && (commitTime = now$1());
7568d7475
< enableProfilerTimer && enableProfilerTimer && (totalElapsedPauseTime = 0);
Only in /Users/bvaughn/Desktop/builds/branch/facebook-www: ReactDOM-profiling.js
diff /Users/bvaughn/Desktop/builds/master/facebook-www/ReactDOMServer-dev.js /Users/bvaughn/Desktop/builds/branch/facebook-www/ReactDOMServer-dev.js
64d63
< var enableProfilerTimer = _require.enableProfilerTimer;
Common subdirectories: /Users/bvaughn/Desktop/builds/master/facebook-www/shims and /Users/bvaughn/Desktop/builds/branch/facebook-www/shims There are no changes to Only in /Users/bvaughn/Desktop/builds/branch/react-native/fb: ReactFabric-profiling.js
diff /Users/bvaughn/Desktop/builds/master/react-native/fb/ReactNativeRenderer-dev.js /Users/bvaughn/Desktop/builds/branch/react-native/fb/ReactNativeRenderer-dev.js
4366d4365
< var enableProfilerTimer = _require.enableProfilerTimer;
4369a4369
> var enableProfilerTimer = true;
diff /Users/bvaughn/Desktop/builds/master/react-native/fb/ReactNativeRenderer-prod.js /Users/bvaughn/Desktop/builds/branch/react-native/fb/ReactNativeRenderer-prod.js
1716,1717c1716
< enableSuspense = _require.enableSuspense,
< enableProfilerTimer = _require.enableProfilerTimer;
---
> enableSuspense = _require.enableSuspense;
1832d1830
< var isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
1867,1868d1864
< enableProfilerTimer &&
< (this.treeBaseTime = this.selfBaseTime = this.actualStartTime = this.actualDuration = 0);
1887,1890c1883
< (workInProgress.lastEffect = null),
< enableProfilerTimer &&
< ((workInProgress.actualDuration = 0),
< (workInProgress.actualStartTime = 0)));
---
> (workInProgress.lastEffect = null));
1899,1901d1891
< enableProfilerTimer &&
< ((workInProgress.selfBaseTime = current.selfBaseTime),
< (workInProgress.treeBaseTime = current.treeBaseTime));
1995,1997c1985
< isAsync = isAsync ? 3 : 0;
< enableProfilerTimer && isDevToolsPresent && (isAsync |= 4);
< isAsync = new FiberNode(3, null, null, isAsync);
---
> isAsync = new FiberNode(3, null, null, isAsync ? 3 : 0);
2361,2377d2348
< var commitTime = 0,
< timerPausedAt = 0,
< totalElapsedPauseTime = 0;
< function recordElapsedActualRenderTime(fiber) {
< enableProfilerTimer &&
< (fiber.actualDuration =
< now$1() - totalElapsedPauseTime - fiber.actualDuration);
< }
< function resumeActualRenderTimerIfPaused() {
< enableProfilerTimer &&
< 0 < timerPausedAt &&
< ((totalElapsedPauseTime += now$1() - timerPausedAt), (timerPausedAt = 0));
< }
< var baseStartTime = -1;
< function stopBaseRenderTimerIfRunning() {
< enableProfilerTimer && (baseStartTime = -1);
< }
3335,3339c3306,3311
< !didCaptureError ||
< (enableGetDerivedStateFromCatch &&
< "function" === typeof ctor.getDerivedStateFromCatch)
< ? (ctor = shouldUpdate.render())
< : ((ctor = null), enableProfilerTimer && stopBaseRenderTimerIfRunning());
---
> ctor =
> !didCaptureError ||
> (enableGetDerivedStateFromCatch &&
> "function" === typeof ctor.getDerivedStateFromCatch)
> ? shouldUpdate.render()
> : null;
3497d3468
< enableProfilerTimer && stopBaseRenderTimerIfRunning();
3523,3528d3493
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< enableProfilerTimer &&
< ((workInProgress.actualDuration =
< now$1() - workInProgress.actualDuration - totalElapsedPauseTime),
< (workInProgress.actualStartTime = now$1()));
3533d3497
< enableProfilerTimer && stopBaseRenderTimerIfRunning();
3970d3933
< enableProfilerTimer && (workInProgress.effectTag |= 4),
4041,4043d4003
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< recordElapsedActualRenderTime(workInProgress);
4544,4553d4503
< enableProfilerTimer &&
< ((instance = finishedWork.memoizedProps.onRender),
< instance(
< finishedWork.memoizedProps.id,
< null === current ? "mount" : "update",
< finishedWork.actualDuration,
< finishedWork.treeBaseTime,
< finishedWork.actualStartTime,
< commitTime
< ));
4731,4733d4680
< enableProfilerTimer &&
< workInProgress.mode & 4 &&
< recordElapsedActualRenderTime(workInProgress);
4789,4792d4735
< enableProfilerTimer &&
< interruptedWork$jscomp$0.mode & 4 &&
< (resumeActualRenderTimerIfPaused(),
< recordElapsedActualRenderTime(interruptedWork$jscomp$0));
4842,4858c4785,4790
< if (enableProfilerTimer && workInProgress.mode & 4) {
< updateQueue = workInProgress.selfBaseTime;
< for (var child = workInProgress.child; null !== child; )
< (updateQueue += child.treeBaseTime),
< 0 !== child.expirationTime &&
< (0 === newExpirationTime ||
< newExpirationTime > child.expirationTime) &&
< (newExpirationTime = child.expirationTime),
< (child = child.sibling);
< workInProgress.treeBaseTime = updateQueue;
< } else
< for (updateQueue = workInProgress.child; null !== updateQueue; )
< 0 !== updateQueue.expirationTime &&
< (0 === newExpirationTime ||
< newExpirationTime > updateQueue.expirationTime) &&
< (newExpirationTime = updateQueue.expirationTime),
< (updateQueue = updateQueue.sibling);
---
> for (updateQueue = workInProgress.child; null !== updateQueue; )
> 0 !== updateQueue.expirationTime &&
> (0 === newExpirationTime ||
> newExpirationTime > updateQueue.expirationTime) &&
> (newExpirationTime = updateQueue.expirationTime),
> (updateQueue = updateQueue.sibling);
4896,4908c4828,4833
< var current = workInProgress.alternate;
< enableProfilerTimer
< ? (workInProgress.mode & 4 &&
< enableProfilerTimer &&
< (baseStartTime = now$1()),
< (current = beginWork(current, workInProgress, nextRenderExpirationTime)),
< workInProgress.mode & 4 &&
< (enableProfilerTimer &&
< -1 !== baseStartTime &&
< (workInProgress.selfBaseTime = now$1() - baseStartTime),
< stopBaseRenderTimerIfRunning()))
< : (current = beginWork(current, workInProgress, nextRenderExpirationTime));
< null === current && (current = completeUnitOfWork(workInProgress));
---
> var next = beginWork(
> workInProgress.alternate,
> workInProgress,
> nextRenderExpirationTime
> );
> null === next && (next = completeUnitOfWork(workInProgress));
4910c4835
< return current;
---
> return next;
4935c4860
< if (isYieldy) {
---
> if (isYieldy)
4938,4942c4863
< enableProfilerTimer &&
< enableProfilerTimer &&
< 0 === timerPausedAt &&
< (timerPausedAt = now$1());
< } else
---
> else
4946,4950c4867
< if (
< (enableProfilerTimer && stopBaseRenderTimerIfRunning(),
< null === nextUnitOfWork)
< )
< (didFatal = !0), onUncaughtError(thrownValue);
---
> if (null === nextUnitOfWork) (didFatal = !0), onUncaughtError(thrownValue);
5276d5192
< enableProfilerTimer && resumeActualRenderTimerIfPaused();
5345,5349c5261
< ? ((root.finishedWork = isYieldy),
< enableProfilerTimer &&
< enableProfilerTimer &&
< 0 === timerPausedAt &&
< (timerPausedAt = now$1()))
---
> ? (root.finishedWork = isYieldy)
5467d5378
< enableProfilerTimer && enableProfilerTimer && (commitTime = now$1());
5622d5532
< enableProfilerTimer && enableProfilerTimer && (totalElapsedPauseTime = 0);
Only in /Users/bvaughn/Desktop/builds/branch/react-native/fb: ReactNativeRenderer-profiling.js |
So we don't have to depend on a runtime check.