Synclets logoSynclets

MetaConnectorOptimizations

The MetaConnectorOptimizations type lists optional bulk operations a connector can implement to improve performance.

{
  readTimestamps?: (address: TimestampsAddress<Depth>) => Promise<Timestamps>;
  getMeta?: () => Promise<Meta>;
}
TypeDescription
readTimestamps?(address: TimestampsAddress<Depth>) => Promise<Timestamps>

The readTimestamps optimization callback can retrieve all Timestamp values under a parent address in a single operation. Return an object mapping child IDs to their Timestamp strings. Implementing this optimization can significantly improve sync performance by reducing storage round-trips during conflict resolution.

getMeta?() => Promise<Meta>

The getMeta optimization callback can return the connector's complete metadata tree in a single operation. This is used by Synclet.getMeta() when available and can dramatically improve performance for full-tree reads. The returned Meta object should mirror the data tree structure but contain Timestamps instead of Atoms.

Since

v0.0.0