Skip to content

Commit

Permalink
perf: open Hive boxes concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascenio committed Nov 25, 2021
1 parent 98ce074 commit 33ea16e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/graphql_flutter/lib/src/hive_init.dart
Expand Up @@ -26,8 +26,6 @@ Future<void> initHiveForFlutter({String? subDir, Iterable<String> boxes = const
Hive.init(path);
}

for (var box in boxes){
await Hive.openBox(box);
}

final futures = boxes.map(Hive.openBox);
await Future.wait(futures);
}

0 comments on commit 33ea16e

Please sign in to comment.