From 7a38cfbc40c4e6dc9a58f16301f2205359cce07f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 17 Feb 2024 14:34:38 -0600 Subject: [PATCH] Remove Sentry from SqliteWorker It seems to be destroying CPU performance? --- src/workers/sqlite.worker.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/workers/sqlite.worker.ts b/src/workers/sqlite.worker.ts index 564149a..5ea1dd5 100644 --- a/src/workers/sqlite.worker.ts +++ b/src/workers/sqlite.worker.ts @@ -1,6 +1,6 @@ /// -import { Comlink, type CompiledQuery, Debug, DenoSqlite3, type QueryResult, Sentry } from '@/deps.ts'; +import { Comlink, type CompiledQuery, Debug, DenoSqlite3, type QueryResult } from '@/deps.ts'; import '@/sentry.ts'; let db: DenoSqlite3 | undefined; @@ -13,16 +13,11 @@ export const SqliteWorker = { executeQuery({ sql, parameters }: CompiledQuery): QueryResult { if (!db) throw new Error('Database not open'); debug(sql); - - const result: QueryResult = Sentry.startSpan({ name: sql, op: 'db.query' }, () => { - return { - rows: db!.prepare(sql).all(...parameters as any[]) as R[], - numAffectedRows: BigInt(db!.changes), - insertId: BigInt(db!.lastInsertRowId), - }; - }); - - return result; + return { + rows: db!.prepare(sql).all(...parameters as any[]) as R[], + numAffectedRows: BigInt(db!.changes), + insertId: BigInt(db!.lastInsertRowId), + }; }, destroy() { db?.close();