Commit b627afc
Container: Enable getPendingLocalState by default (microsoft#25631)
The PR enables calling getPendingLocalState by default, and ensures the
overhead of capturing the pending state is minimized and/or deferred to
the getPendingLocalState call itself. The primary means by which we
reduce the overhead is my switching the in-memory representation of the
snapshot from SnapshotWithBlobs to ISnapshot.
ISnapshot has a number of advantages as an in-memory format, primarily
it matches the native format returned by modern drivers, and includes
both the snapshot tree, as well as the snapshot blobs as ArrayBuffers.
Since this format matches the driver's format, which eventually gets
passed down into the runtime, we ensure we are not storing a duplicate
copy, which could have significant memory overhead for large documents.
SnapshotWithBlobs on the other had stores blobs as strings, which is
great for serialization, but is redundant with the ArrayBuffers the rest
of fluid operates over. In getPendingLocalState we still need to convert
to SnapshotWithBlobs as the result is the serializable, but this is
deferred until it is needed.
For compatibly with older drivers, we still maintain support for driver
that do not return ISnapshot, but now we defer blob retrieval until
getPendingLocalState is called. This ensures the load path doesn't need
to retrieve any additional data than what is required by the load flow.
Outside of the container-loader package, all updates are just to test to
remove the old config, as it is no longer necessary to explicitly enable
the feature.
---------
Co-authored-by: Mark Fields <markfields@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 3c8a3a9 commit b627afc
File tree
23 files changed
+229
-322
lines changed- experimental/dds/tree/src/test/utilities
- packages
- dds/tree/src/test
- loader/container-loader/src
- test
- test
- local-server-tests/src/test
- test-end-to-end-tests/src/test
- data-virtualization
- migration-shim
- offline
23 files changed
+229
-322
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | 324 | | |
326 | 325 | | |
327 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
351 | 350 | | |
352 | 351 | | |
353 | 352 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | 353 | | |
362 | 354 | | |
363 | | - | |
| 355 | + | |
364 | 356 | | |
365 | 357 | | |
366 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
1026 | | - | |
| 1026 | + | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
| |||
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
1671 | | - | |
1672 | | - | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
1673 | 1676 | | |
1674 | 1677 | | |
1675 | 1678 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 189 | + | |
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
| |||
0 commit comments