Closed tarabishy2020 closed 6 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 3d45aec7c7add017c59c703739465f5dba8fabeb:
Sandbox | Source |
---|---|
React | Configuration |
React Typescript | Configuration |
I like the idea to improve the performance, bug https://github.com/valtiojs/valtio-yjs/pull/40#discussion_r1294170803 is not acceptable.
I was going through the code and noticed that
SubscribeP
function andparseProxyOps
are a bit confusing as there are redundant iterations going on there.parseProxyOps
works on the whole set of operations, but those could be related to different paths, yet it's still being called multiple times for each operation.The refactor makes sure
parseProxyOps
is called one time. And arrayOps are processed on a per path basis.