js-bao-wss-client / DocumentSnapshotLoadEvent
Interface: DocumentSnapshotLoadEvent
How a large document's base snapshot load is going.
A cold open of a large document streams a base of up to gigabytes before the document is usable, which can take minutes. An app with nothing to show for that is indistinguishable from one that has hung, so the load reports itself: started once the manifest is in hand (which is where totalRows comes from, so a progress bar exists before the first chunk lands), progress per chunk, model as each model becomes queryable, and loaded at the end.
Properties
chunks
chunks:
number
chunksReused?
optionalchunksReused?:number
Chunks a convergence kept rather than fetched, on the loaded phase of a "converge" load. The saving the whole design exists for.
documentId
documentId:
string
epoch
epoch:
number
The epoch the snapshot is a base for.
mode?
optionalmode?:"load"|"converge"
What this load IS.
"load" installs a base whole — a cold start, or a rebuild. "converge" replaces only the ranges a bulk load touched and keeps the rest, which is why it also reports chunksReused.
model?
optionalmodel?:string
The model the event concerns, when it concerns one.
phase
phase:
"started"|"progress"|"model"|"loaded"
rows
rows:
number
totalChunks
totalChunks:
number
totalRows
totalRows:
number