Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Parallelize model initialization

vishnukvmd860b5d74d8dd
diff --git a/lib/services/semantic_search/frameworks/ml_framework.dart b/lib/services/semantic_search/frameworks/ml_framework.dart
index 7e71e4917a..5524f63caf 100644
--- a/lib/services/semantic_search/frameworks/ml_framework.dart
+++ b/lib/services/semantic_search/frameworks/ml_framework.dart
@@ -47,8 +47,7 @@ abstract class MLFramework {
/// initialization. For eg. if you wish to load the model from `/assets`
/// instead of a CDN.
Future<void> init() async {
- await _initImageModel();
- await _initTextModel();
+ await Future.wait([_initImageModel(), _initTextModel()]);
_initState = InitializationState.initialized;
}