diff --git a/mobile/lib/db/remote/db.dart b/mobile/lib/db/remote/db.dart index a8573e92cd..eb42d917bf 100644 --- a/mobile/lib/db/remote/db.dart +++ b/mobile/lib/db/remote/db.dart @@ -43,19 +43,14 @@ class RemoteDB { Future insertCollections(List collections) async { if (collections.isEmpty) return; final stopwatch = Stopwatch()..start(); - int inserted = 0; await Future.forEach(collections.slices(_batchInsertMaxCount), (slice) async { - debugPrint( - '$runtimeType insertCollections inserting slice of [${inserted + 1}, ${inserted + slice.length}] entries', - ); final List> values = slice.map((e) => e.rowValiues()).toList(); await _sqliteDB.executeBatch( 'INSERT OR REPLACE INTO collections ($collectionColumns) values($collectionValuePlaceHolder)', values, ); - inserted += slice.length; }); debugPrint( '$runtimeType insertCollections complete in ${stopwatch.elapsed.inMilliseconds}ms for ${collections.length} collections',