You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
IHaveKnownChanges lets an observable collection query state which of its items changed, so the delta for an emission is the one the provider already knows rather than one rediscovered by comparison. An emitted collection is still an IEnumerable<T> of the read model, so existing subscribers are unaffected, and a provider that cannot know what changed continues to be served by the comparison fallback.
Fixed
An observable collection query backed by MongoDB no longer costs time proportional to the size of the collection every time a single document changes. The change stream already names the changed document, and the observable already decides what that meant for the observed set; that verdict is now carried on the emission instead of being discarded and then rediscovered by serializing every item of the new snapshot and the previous one.
The comparison fallback no longer serializes every item twice on every emission. Unchanged items are the very same instances the previous snapshot held, so reference equality settles most comparisons and record value equality settles the rest; serializing is now the last resort for an item type that overrides neither.
Removing an item from a paged observable query now reports the document pulled onto the page to replace it, so a client applying the delta no longer ends up one row short.