@samitouri / QOS-React-2 / commits / af1a4cbf7a

Revert expiration for retry lanes (#21300)

Retries should be allowed to expire if they are CPU bound for too long, but when I made this change it caused a spike in browser crashes. There must be some other underlying bug; not super urgent but ideally should figure out why and fix it. Unfortunately we don't have a repro for the crashes, only detected via production metrics.

Andrew Clark committed Apr 16, 2021 at 16:45 UTC af1a4cbf7adf2acae6f869e397198752d150e29a
2 files changed +14 -2
packages/react-reconciler/src/ReactFiberLane.new.js
+7 -1
@@ -362,12 +362,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
362 case TransitionLane14:
363 case TransitionLane15:
364 case TransitionLane16:
365 + return currentTime + 5000;
366 case RetryLane1:
367 case RetryLane2:
368 case RetryLane3:
369 case RetryLane4:
370 case RetryLane5:
370 - return currentTime + 5000;
371 + // TODO: Retries should be allowed to expire if they are CPU bound for
372 + // too long, but when I made this change it caused a spike in browser
373 + // crashes. There must be some other underlying bug; not super urgent but
374 + // ideally should figure out why and fix it. Unfortunately we don't have
375 + // a repro for the crashes, only detected via production metrics.
376 + return NoTimestamp;
377 case SelectiveHydrationLane:
378 case IdleHydrationLane:
379 case IdleLane:
packages/react-reconciler/src/ReactFiberLane.old.js
+7 -1
@@ -362,12 +362,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
362 case TransitionLane14:
363 case TransitionLane15:
364 case TransitionLane16:
365 + return currentTime + 5000;
366 case RetryLane1:
367 case RetryLane2:
368 case RetryLane3:
369 case RetryLane4:
370 case RetryLane5:
370 - return currentTime + 5000;
371 + // TODO: Retries should be allowed to expire if they are CPU bound for
372 + // too long, but when I made this change it caused a spike in browser
373 + // crashes. There must be some other underlying bug; not super urgent but
374 + // ideally should figure out why and fix it. Unfortunately we don't have
375 + // a repro for the crashes, only detected via production metrics.
376 + return NoTimestamp;
377 case SelectiveHydrationLane:
378 case IdleHydrationLane:
379 case IdleLane: