From ddaab89979da7058db486250ab10c881e0327235 Mon Sep 17 00:00:00 2001 From: Omar Date: Thu, 18 Jun 2026 19:04:09 +0200 Subject: [PATCH] only enable sqlite debug marker in debug/profile --- cw_core/lib/db/sqlite.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cw_core/lib/db/sqlite.dart b/cw_core/lib/db/sqlite.dart index bbcbf1941..43bef5f38 100644 --- a/cw_core/lib/db/sqlite.dart +++ b/cw_core/lib/db/sqlite.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cw_core/db/sqlite_debug.dart'; import 'package:cw_core/root_dir.dart'; import 'package:cw_core/utils/print_verbose.dart'; +import 'package:flutter/foundation.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:path/path.dart' as p; @@ -31,6 +32,10 @@ Future sqliteDebugMarkerFile() async { } Future initDb({String? pathOverride}) async { + if (!kDebugMode && !kProfileMode) { + await _initDb(pathOverride: pathOverride); + return; + } final dbDebugMarker = await sqliteDebugMarkerFile(); try { if (dbDebugMarker.existsSync()) {