UBERF-4319: Performance changes (#4474)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-01-30 18:07:34 +07:00
committed by GitHub
parent d02e88737d
commit e6a35d2a03
37 changed files with 775 additions and 436 deletions
+8 -2
View File
@@ -34,7 +34,8 @@ import core, {
TxResult,
SearchQuery,
SearchOptions,
SearchResult
SearchResult,
MeasureDoneOperation
} from '@hcengineering/core'
import { createInMemoryTxAdapter } from '@hcengineering/dev-storage'
import devmodel from '@hcengineering/devmodel'
@@ -104,6 +105,10 @@ class ServerStorageWrapper implements ClientConnection {
async upload (domain: Domain, docs: Doc[]): Promise<void> {}
async clean (domain: Domain, docs: Ref<Doc>[]): Promise<void> {}
async measure (operationName: string): Promise<MeasureDoneOperation> {
return async () => ({ time: 0, serverTime: 0 })
}
}
async function createNullFullTextAdapter (): Promise<FullTextAdapter> {
@@ -152,7 +157,8 @@ export async function connect (handler: (tx: Tx) => void): Promise<ClientConnect
defaultContentAdapter: 'default',
workspace: getWorkspaceId('')
}
const serverStorage = await createServerStorage(conf, {
const ctx = new MeasureMetricsContext('client', {})
const serverStorage = await createServerStorage(ctx, conf, {
upgrade: false
})
setMetadata(devmodel.metadata.DevModel, serverStorage)