Skip to content

armgit / ente

Public Imported from GitHub
0

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

Early stopping for efficiency

laurenspriemea217404e9c8
diff --git a/mobile/lib/services/search_service.dart b/mobile/lib/services/search_service.dart
index 1554ddcd68..e114e5b34f 100644
--- a/mobile/lib/services/search_service.dart
+++ b/mobile/lib/services/search_service.dart
@@ -925,6 +925,9 @@ class SearchService {
);
for (final clusterId in sortedClusterIds) {
+ if (limit != null && facesResult.length >= limit) {
+ break;
+ }
final files = clusterIdToFiles[clusterId]!;
final String clusterName = clusterId;