Shift fetching litho attributes to background thread

Summary: Due to litho component instances being immutable we are able to process them later if we hold on to the instance. We have added a Maybe deferred type which sort of resembles a Monad. It wraps a value which may or may not be calculated later.

Reviewed By: lblasa

Differential Revision: D41474251

fbshipit-source-id: 2ba6e688518dba55cf4aa5ba53f390a92cf0921f
This commit is contained in:
Luke De Feo
2022-11-23 03:45:26 -08:00
committed by Facebook GitHub Bot
parent c95c59342e
commit 7ec09b4f95
12 changed files with 109 additions and 45 deletions

View File

@@ -63,11 +63,21 @@ const columns: DataTableColumn<PerfStatsEvent>[] = [
return formatDiff(row.snapshotComplete, row.queuingComplete);
},
},
{
key: 'deferredComputationComplete',
title: 'Deferred processing time',
onRender: (row: PerfStatsEvent) => {
return formatDiff(row.queuingComplete, row.deferredComputationComplete);
},
},
{
key: 'serializationComplete',
title: 'Serialization time',
onRender: (row: PerfStatsEvent) => {
return formatDiff(row.queuingComplete, row.serializationComplete);
return formatDiff(
row.deferredComputationComplete,
row.serializationComplete,
);
},
},
{