From 8f3fedf297bcfdbf535ca0e3b0e93afdb1b133a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mitja=20Bezen=C5=A1ek?= Date: Mon, 8 Apr 2024 10:46:06 +0200 Subject: [PATCH] WIP --- packages/editor/src/lib/editor/Editor.ts | 4 ++-- packages/editor/src/lib/editor/managers/SpatialIndex.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index aca34ca84..7b2705daa 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -3214,9 +3214,9 @@ export class Editor extends EventEmitter { * @public */ @computed getRenderingShapes() { - const now = Date.now() + // const now = Date.now() const renderingShapes = this.getUnorderedRenderingShapes(true) - console.log('getUnorderedRenderingShapes', Date.now() - now) + // console.log('getUnorderedRenderingShapes', Date.now() - now) // Its IMPORTANT that the result be sorted by id AND include the index // that the shape should be displayed at. Steve, this is the past you diff --git a/packages/editor/src/lib/editor/managers/SpatialIndex.ts b/packages/editor/src/lib/editor/managers/SpatialIndex.ts index ccd8a2cde..3c0a9775d 100644 --- a/packages/editor/src/lib/editor/managers/SpatialIndex.ts +++ b/packages/editor/src/lib/editor/managers/SpatialIndex.ts @@ -44,11 +44,11 @@ export class SpatialIndex { getShapesInsideBounds(bounds: Box): TLShapeId[] { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const now = Date.now() + // const now = Date.now() const result = this.rBushIncremental().get() const rbush = new TldrawRBush().fromJSON(result) const r = rbush.search(bounds).map((b) => b.id) - console.log('shapes inside bounds', Date.now() - now, 'ms') + // console.log('shapes inside bounds', Date.now() - now, 'ms') return r }