Skip to content

Commit ae4690b

Browse files
committed
clean up isInputPending in Scheduler (#28444)
## Summary `isInputPending` is not in use. This PR cleans up the flags controlling its gating and parameters to simplify Scheduler. Makes `frameYieldMs` feature flag static, set to 10ms in www, which we found built on the wins provided by a broader yield interval via `isInputPending`. Flag remains set to 5ms in OSS builds. ## How did you test this change? `yarn test Scheduler` DiffTrain build for commit 3bcd2de.
1 parent 54a10b4 commit ae4690b

File tree

10 files changed

+14
-30
lines changed

10 files changed

+14
-30
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25733,7 +25733,7 @@ if (__DEV__) {
2573325733
return root;
2573425734
}
2573525735

25736-
var ReactVersion = "18.3.0-canary-172a7f629-20240226";
25736+
var ReactVersion = "18.3.0-canary-3bcd2de01-20240227";
2573725737

2573825738
// Might add PROFILE later.
2573925739

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9171,7 +9171,7 @@ var devToolsConfig$jscomp$inline_1014 = {
91719171
throw Error("TestRenderer does not support findFiberByHostInstance()");
91729172
},
91739173
bundleType: 0,
9174-
version: "18.3.0-canary-172a7f629-20240226",
9174+
version: "18.3.0-canary-3bcd2de01-20240227",
91759175
rendererPackageName: "react-test-renderer"
91769176
};
91779177
var internals$jscomp$inline_1195 = {
@@ -9202,7 +9202,7 @@ var internals$jscomp$inline_1195 = {
92029202
scheduleRoot: null,
92039203
setRefreshHandler: null,
92049204
getCurrentFiber: null,
9205-
reconcilerVersion: "18.3.0-canary-172a7f629-20240226"
9205+
reconcilerVersion: "18.3.0-canary-3bcd2de01-20240227"
92069206
};
92079207
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
92089208
var hook$jscomp$inline_1196 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9599,7 +9599,7 @@ var devToolsConfig$jscomp$inline_1056 = {
95999599
throw Error("TestRenderer does not support findFiberByHostInstance()");
96009600
},
96019601
bundleType: 0,
9602-
version: "18.3.0-canary-172a7f629-20240226",
9602+
version: "18.3.0-canary-3bcd2de01-20240227",
96039603
rendererPackageName: "react-test-renderer"
96049604
};
96059605
var internals$jscomp$inline_1236 = {
@@ -9630,7 +9630,7 @@ var internals$jscomp$inline_1236 = {
96309630
scheduleRoot: null,
96319631
setRefreshHandler: null,
96329632
getCurrentFiber: null,
9633-
reconcilerVersion: "18.3.0-canary-172a7f629-20240226"
9633+
reconcilerVersion: "18.3.0-canary-3bcd2de01-20240227"
96349634
};
96359635
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96369636
var hook$jscomp$inline_1237 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (__DEV__) {
2626
}
2727
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
2828

29-
var ReactVersion = "18.3.0-canary-172a7f629-20240226";
29+
var ReactVersion = "18.3.0-canary-3bcd2de01-20240227";
3030

3131
// ATTENTION
3232
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,4 +598,4 @@ exports.useSyncExternalStore = function (
598598
exports.useTransition = function () {
599599
return ReactCurrentDispatcher.current.useTransition();
600600
};
601-
exports.version = "18.3.0-canary-172a7f629-20240226";
601+
exports.version = "18.3.0-canary-3bcd2de01-20240227";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ exports.useSyncExternalStore = function (
594594
exports.useTransition = function () {
595595
return ReactCurrentDispatcher.current.useTransition();
596596
};
597-
exports.version = "18.3.0-canary-172a7f629-20240226";
597+
exports.version = "18.3.0-canary-3bcd2de01-20240227";
598598
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
599599
"function" ===
600600
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/scheduler/cjs/Scheduler-dev.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<329119982dc400f73a57d3f8fddc6fb4>>
10+
* @generated SignedSource<<58af4bb9ea8656229bd048421236ac87>>
1111
*/
1212

1313
"use strict";
@@ -162,12 +162,6 @@ if (__DEV__) {
162162
var localSetImmediate =
163163
typeof setImmediate !== "undefined" ? setImmediate : null; // IE and Node.js + jsdom
164164

165-
typeof navigator !== "undefined" && // $FlowFixMe[prop-missing]
166-
navigator.scheduling !== undefined && // $FlowFixMe[incompatible-type]
167-
navigator.scheduling.isInputPending !== undefined
168-
? navigator.scheduling.isInputPending.bind(navigator.scheduling)
169-
: null;
170-
171165
function advanceTimers(currentTime) {
172166
// Check for tasks that are no longer delayed and add them to the queue.
173167
var timer = peek(timerQueue);
@@ -490,7 +484,7 @@ if (__DEV__) {
490484
// The main thread has only been blocked for a really short amount of time;
491485
// smaller than a single frame. Don't yield yet.
492486
return false;
493-
} // The main thread has been blocked for a non-negligible amount of time. We
487+
} // Yield now.
494488

495489
return true;
496490
}
@@ -540,7 +534,7 @@ if (__DEV__) {
540534
isMessageLoopRunning = false;
541535
}
542536
}
543-
} // Yielding to the browser will give it a chance to paint, so we can
537+
}
544538
};
545539

546540
var schedulePerformWorkUntilDeadline;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/scheduler/cjs/Scheduler-prod.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<cd7ed3a069445a95189053c07769d208>>
10+
* @generated SignedSource<<cff8a50048229c976ba8e49d76cca4f5>>
1111
*/
1212

1313
"use strict";
@@ -83,11 +83,6 @@ var taskQueue = [],
8383
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
8484
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
8585
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
86-
"undefined" !== typeof navigator &&
87-
void 0 !== navigator.scheduling &&
88-
void 0 !== navigator.scheduling.isInputPending
89-
? navigator.scheduling.isInputPending.bind(navigator.scheduling)
90-
: null;
9186
function advanceTimers(currentTime) {
9287
for (var timer = peek(timerQueue); null !== timer; ) {
9388
if (null === timer.callback) pop(timerQueue);

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/scheduler/cjs/Scheduler-profiling.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<685fe42d89ad677c0374d643bebb57cd>>
10+
* @generated SignedSource<<2a1458dad9404c5aa87cab9701762eca>>
1111
*/
1212

1313
"use strict";
@@ -87,11 +87,6 @@ var taskQueue = [],
8787
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
8888
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
8989
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
90-
"undefined" !== typeof navigator &&
91-
void 0 !== navigator.scheduling &&
92-
void 0 !== navigator.scheduling.isInputPending
93-
? navigator.scheduling.isInputPending.bind(navigator.scheduling)
94-
: null;
9590
function advanceTimers(currentTime) {
9691
for (var timer = peek(timerQueue); null !== timer; ) {
9792
if (null === timer.callback) pop(timerQueue);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
172a7f629a972fedb9e43fbae4fad0e9b1dc7fee
1+
3bcd2de01b5716202eabe8faa338f51bdc59ce26

0 commit comments

Comments
 (0)