Fluid Framework v2.23.0 (minor)
Contents
✨ New Features
Local value changes in presence now raise events (#23858)
The presence value managers now raise events for local value changes. The new events are as follows:
-
LatestValueManager
localUpdated
raised whenlocal
is assigned
-
LatestMapValueManager
localItemUpdated
raised whenlocal.set
is calledlocalItemRemoved
raised whenlocal.delete
is called
Change details
Commit: 2896983
Affected packages:
- @fluidframework/presence
🌳 SharedTree DDS Changes
Op bunching performance enhancements (#23732)
SharedTree
now takes advantage of a new feature called "op bunching" where contiguous ops in a grouped batch are bunched and processed together. This improves the performance of processing ops asymptotically; as the number of local ops and incoming ops increase, the processing time will reduce.
For example, with 10 local ops + 10 incoming ops, the performance increases by 70%; with 100 local ops + 100 incoming ops, the performance increases by 94%.
This will help improve performance in the following scenarios:
- A client makes a large number of changes in a single JS turn. For example, copy pasting large data like a table.
- A client has a large number of local changes. For example, slow clients whose changes are slow to ack or clients with a local branch with large number of changes.
Change details
Commit: a98b04f
Affected packages:
- @fluidframework/tree
- fluid-framework
Invalid schema base classes in Tree.is now throw an error instead of returning false (#23938)
As documented in TreeNodeSchemaClass
, there are specific rules around sub-classing schema, mainly that only a single most derived class can be used. One place where it was easy to accidentally violate this rule and get hard-to-debug results was Tree.is
. This has been mitigated by adding a check in Tree.is
which detects this mistake (which used to result in false
being returned) and instead throws a UsageError
explaining the situation. The error will look something like:
Two schema classes were used (CustomObjectNode and Derived) which derived from the same SchemaFactory generated class ("com.example.Test"). This is invalid.
For applications wanting to test if a given TreeNode
is an instance of some schema base class, this can be done using instanceof
which includes base classes when doing the check.
Change details
Commit: 0099565
Affected packages:
- @fluidframework/tree
- fluid-framework
Creating large transactions and processing inbound changes is now faster (#23929)
SharedTree sometimes composes several sequential changes into a single change. It does so whenever a transaction is created and when processing inbound changes.
Version 2.23.0 makes this composition process asymptotically faster. For example, creating a transaction that performs 1000 edits on a single array now takes 170ms instead of 1.5s (an 89% improvement).
See Change #23902 for more details.
Change details
Commit: 35847b5
Affected packages:
- @fluidframework/tree
- fluid-framework
Faster processing of events for large transactions (#23939)
In versions prior to 2.23.0, event processing time could scale quadratically (O(N^2)
) with the change count when processing a batch of changes.
This performance characteristic has been corrected. See change #23908 for more details.
Change details
Commit: 2a1e7e0
Affected packages:
- fluid-framework
- @fluidframework/tree
⚠️ Deprecations
The FluidDataStoreRuntime.process function is now deprecated (#23866)
A new function processMessages
has been added in place of process
. The new function will be called to process multiple messages instead of a single one on the data store runtime. This is part of a feature called "op bunching" where contiguous ops of a given type and to a given data store / DDS are bunched and sent together for processing.
Note that process
may still be called in scenarios where this data store runtime (Datastore layer) is running with an older version of data store context (Runtime layer) in the same client. This is to support Fluid layer compatibility.
Change details
Commit: 3f44d43
Affected packages:
- @fluidframework/datastore
🛠️ Start Building Today!
Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework!