Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(infra): use yjs mergeupdate for performance (#7343)

EYHN33bb2b5fcd8a
diff --git a/packages/common/infra/src/sync/doc/storage.ts b/packages/common/infra/src/sync/doc/storage.ts
index 0260f84fb3..bc6880c3b1 100644
--- a/packages/common/infra/src/sync/doc/storage.ts
+++ b/packages/common/infra/src/sync/doc/storage.ts
@@ -1,6 +1,8 @@
+import { mergeUpdates } from 'yjs';
+
import type { ByteKV, Memento } from '../../storage';
import { MemoryMemento, ReadonlyByteKV, wrapMemento } from '../../storage';
-import { AsyncLock, mergeUpdates, throwIfAborted } from '../../utils';
+import { AsyncLock, throwIfAborted } from '../../utils';
import type { DocEventBus } from '.';
import { DocEventBusInner, MemoryDocEventBus } from './event';
import { isEmptyUpdate } from './utils';