-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In order to avoid unnecessary cloning we can infer from the AST the type of operations that occur on data and then can label which props need cloning and which don't.
The default strategy should be as conservative as possible and expand from there.
We can augment the producer object with a mutated prop that flags which property is potentially mutated and then rely on the runtime to apply the proper approach.
....
mutated: {
foo: false,
bar: true,
baz: {
bam: false
}
}
Cloning inside producers is done at a granular level but a flag needs to be given to the db to avoid cloning values on listeners.
Another topic would be the cloning done during the set operation. This might be trickier to implement.
Only observe and get.value fall in the category of cloning.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request