Perf:Avoid redundant reading and decrypting all collections

This commit is contained in:
Neeraj Gupta 2023-05-23 15:20:54 +05:30
parent be65123544
commit 90bb00fefb

View file

@ -101,7 +101,10 @@ class CollectionsService {
// Might not have synced the collection fully
final fetchedCollections =
await _fetchCollections(lastCollectionUpdationTime);
watch.log("remote fetch");
watch.log("remote fetch collections ${fetchedCollections.length}");
if (fetchedCollections.isEmpty) {
return;
}
final updatedCollections = <Collection>[];
int maxUpdationTime = lastCollectionUpdationTime;
final ownerID = _config.getUserID();