Commit b239264
committed
[Flight] Serialize deduped elements by direct reference even if they suspend (#28283)
In #28123 I switched these to be lazy references. However that creates a
lazy wrapper even if they're synchronously available. We try to as much
as possible preserve the original data structure in these cases.
E.g. here in the dev outlining I only use a lazy wrapper if it didn't
complete synchronously:
https://github.com/facebook/react/pull/28272/files#diff-d4c9c509922b3671d3ecce4e051df66dd5c3d38ff913c7a7fe94abc3ba2ed72eR638
Unfortunately we don't have a data structure that tracks the status of
each emitted row. We could store the task in the map but then they
couldn't be GC:ed as they complete. We could maybe store the status of
each element but seems so heavy.
For now I just went back to direct reference which might be an issue
since it can suspend something higher up when deduped.
DiffTrain build for [ba5e6a8](ba5e6a8)1 parent 64de3b0 commit b239264
5 files changed
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17066 | 17066 | | |
17067 | 17067 | | |
17068 | 17068 | | |
17069 | | - | |
| 17069 | + | |
17070 | 17070 | | |
17071 | 17071 | | |
17072 | 17072 | | |
| |||
17097 | 17097 | | |
17098 | 17098 | | |
17099 | 17099 | | |
17100 | | - | |
| 17100 | + | |
17101 | 17101 | | |
17102 | 17102 | | |
17103 | 17103 | | |
| |||
17525 | 17525 | | |
17526 | 17526 | | |
17527 | 17527 | | |
17528 | | - | |
| 17528 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1952 | 1952 | | |
1953 | 1953 | | |
1954 | 1954 | | |
1955 | | - | |
| 1955 | + | |
1956 | 1956 | | |
1957 | 1957 | | |
1958 | | - | |
1959 | | - | |
1960 | | - | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1961 | 1965 | | |
1962 | 1966 | | |
1963 | 1967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
787 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
788 | 789 | | |
789 | 790 | | |
790 | 791 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26053 | 26053 | | |
26054 | 26054 | | |
26055 | 26055 | | |
26056 | | - | |
| 26056 | + | |
26057 | 26057 | | |
26058 | 26058 | | |
26059 | 26059 | | |
| |||
0 commit comments