mirror of
https://github.com/yjs/yjs.git
synced 2026-02-23 19:49:59 +01:00
ds is no longer maintained on store - improves perf
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
GC,
|
||||
splitItem,
|
||||
IdSet,
|
||||
Transaction, ID, Item // eslint-disable-line
|
||||
Transaction, ID, Item, // eslint-disable-line
|
||||
createDeleteSetFromStructStore
|
||||
} from '../internals.js'
|
||||
|
||||
import * as math from 'lib0/math'
|
||||
@@ -14,7 +14,7 @@ export class StructStore {
|
||||
* @type {Map<number,Array<GC|Item>>}
|
||||
*/
|
||||
this.clients = new Map()
|
||||
this.ds = new IdSet()
|
||||
// this.ds = new IdSet()
|
||||
/**
|
||||
* @type {null | { missing: Map<number, number>, update: Uint8Array }}
|
||||
*/
|
||||
@@ -24,6 +24,9 @@ export class StructStore {
|
||||
*/
|
||||
this.pendingDs = null
|
||||
}
|
||||
get ds () {
|
||||
return createDeleteSetFromStructStore(this)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -308,7 +308,7 @@ const cleanupTransactions = (transactionCleanups, i) => {
|
||||
const store = doc.store
|
||||
const ds = transaction.deleteSet
|
||||
const mergeStructs = transaction._mergeStructs
|
||||
insertIntoIdSet(store.ds, ds)
|
||||
// insertIntoIdSet(store.ds, ds)
|
||||
try {
|
||||
doc.emit('beforeObserverCalls', [transaction, doc])
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
Skip,
|
||||
diffUpdateV2,
|
||||
convertUpdateFormatV2ToV1,
|
||||
IdSet, DSDecoderV2, Doc, Transaction, GC, Item, StructStore, // eslint-disable-line
|
||||
IdSet, DSDecoderV2, Doc, Transaction, GC, Item, StructStore, createDeleteSetFromStructStore, // eslint-disable-line
|
||||
} from '../internals.js'
|
||||
|
||||
import * as encoding from 'lib0/encoding'
|
||||
|
||||
Reference in New Issue
Block a user