ソースを参照

Compute time more accurately

vishnukvmd 1 年間 前
コミット
58ff6aeaaf
1 ファイル変更2 行追加2 行削除
  1. 2 2
      lib/services/semantic_search_service.dart

+ 2 - 2
lib/services/semantic_search_service.dart

@@ -175,13 +175,13 @@ class SemanticSearchService {
     if (!hasLoaded) {
       return;
     }
-    _logger.info("Running clip over " + files.length.toString() + " items");
     final List<String> filePaths = [];
 
-    final startTime = DateTime.now();
     for (final file in files) {
       filePaths.add((await getThumbnailFile(file))!.path);
     }
+    _logger.info("Running clip over " + files.length.toString() + " items");
+    final startTime = DateTime.now();
     final List<List<double>> imageEmbeddings = [];
     if (filePaths.length == 1) {
       final result = await _computer.compute(