3343
}
3344
let start = -1;
3345
let end = -1;
3346
+ let byteSize = 0;
3347
// $FlowFixMe[method-unbinding]
3348
if (typeof performance.getEntriesByType === 'function') {
3349
// We may be able to collect the start and end time of this resource from Performance Observer.
3353
if (resourceEntry.name === href) {
3354
start = resourceEntry.startTime;
3355
end = start + resourceEntry.duration;
3356
+ // $FlowFixMe[prop-missing]
3357
+ byteSize = (resourceEntry.transferSize: any) || 0;
3358
}
3359
}
3360
}
3370
// $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.
3371
owner: fiber, // Allow linking to the <link> if it's not filtered.
3372
};
3373
+ if (byteSize > 0) {
3374
+ // $FlowFixMe[cannot-write]
3375
+ ioInfo.byteSize = byteSize;
3376
+ }
3377
const asyncInfo: ReactAsyncInfo = {
3378
awaited: ioInfo,
3379
// $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.
3438
}
3439
let start = -1;
3440
let end = -1;
3441
+ let byteSize = 0;
3442
let fileSize = 0;
3443
// $FlowFixMe[method-unbinding]
3444
if (typeof performance.getEntriesByType === 'function') {
3450
start = resourceEntry.startTime;
3451
end = start + resourceEntry.duration;
3452
// $FlowFixMe[prop-missing]
3445
- fileSize = (resourceEntry.encodedBodySize: any) || 0;
3453
+ fileSize = (resourceEntry.decodedBodySize: any) || 0;
3454
+ // $FlowFixMe[prop-missing]
3455
+ byteSize = (resourceEntry.transferSize: any) || 0;
3456
}
3457
}
3458
}
3486
// $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.
3487
owner: fiber, // Allow linking to the <link> if it's not filtered.
3488
};
3489
+ if (byteSize > 0) {
3490
+ // $FlowFixMe[cannot-write]
3491
+ ioInfo.byteSize = byteSize;
3492
+ }
3493
const asyncInfo: ReactAsyncInfo = {
3494
awaited: ioInfo,
3495
// $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.
4718
trackDebugInfoFromLazyType(nextFiber);
4719
trackDebugInfoFromUsedThenables(nextFiber);
4720
4707
- if (
4708
- nextFiber.tag === HostHoistable &&
4709
- prevFiber.memoizedState !== nextFiber.memoizedState
4710
- ) {
4721
+ if (nextFiber.tag === HostHoistable) {
4722
const nearestInstance = reconcilingParent;
4723
if (nearestInstance === null) {
4724
throw new Error('Did not expect a host hoistable to be the root');
4725
}
4715
- releaseHostResource(nearestInstance, prevFiber.memoizedState);
4716
- aquireHostResource(nearestInstance, nextFiber.memoizedState);
4726
+ if (prevFiber.memoizedState !== nextFiber.memoizedState) {
4727
+ releaseHostResource(nearestInstance, prevFiber.memoizedState);
4728
+ aquireHostResource(nearestInstance, nextFiber.memoizedState);
4729
+ }
4730
trackDebugInfoFromHostResource(nearestInstance, nextFiber);
4731
} else if (
4732
nextFiber.tag === HostComponent ||
5961
description: getIODescription(resolvedValue),
5962
start: ioInfo.start,
5963
end: ioInfo.end,
5964
+ byteSize: ioInfo.byteSize == null ? null : ioInfo.byteSize,
5965
value: ioInfo.value == null ? null : ioInfo.value,
5966
env: ioInfo.env == null ? null : ioInfo.env,
5967
owner: