Skip to content

Conversation

@ubik2
Copy link
Contributor

@ubik2 ubik2 commented Nov 10, 2025

Creating draft PR for tracking


Summary by cubic

Lays groundwork for doc‑level subscriptions (CT‑977) and speeds up schema traversal. Reuses a single ContextualFlowControl and simplifies session types across memory and space.

  • Performance

    • Reuse one ContextualFlowControl per traversal; pass through getAtPath, followPointer, narrowSchema to avoid repeated allocation.
    • selectSchema creates and reuses the same ContextualFlowControl (no behavior change expected).
    • Expanded traverse timing test and split large fixture into JSON; fixed path/value mismatch in test setup.
  • Refactors

    • Consolidated session types: introduced SpaceStoreSession; internal Session is no longer exported; Space implements SpaceStoreSession; Memory maps spaces by DID.
    • Updated Memory internals (subscribe/unsubscribe/query/transact/mount/close) to operate on a minimal MemorySessionState.
    • Added design doc: docs/future-tasks/doc-level-subscriptions.md outlining cache-based doc-level subscription approach and tradeoffs.

Written for commit 0e07ae3. Summary will update automatically on new commits.

ubik2 added 9 commits October 8, 2025 15:04
- Change space-schema.ts and space.ts to get rid of one of our many different definitions of Session (this version becomes SpaceStoreSession)
… getAtPath, followPointer, and narrowSchema.

This prevents creating these on demand, which is expensive.
…e creation to selectSchema and passing it around.

Added comments around some of the more confusing interfaces and renamed some interfaces to avoid using the same name for many different things.
Fix mismatch with fact value passed into traverse (this needs to have the path and value pointing at the value already).
Added more features to the TestObjectManager to replicate either string based storage or object based storage.
@linear
Copy link

linear bot commented Nov 10, 2025

@ubik2
Copy link
Contributor Author

ubik2 commented Nov 10, 2025

The shared cfc object landed separately in main, so it's not really part of this PR anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants