mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Time some fn
This commit is contained in:
parent
f01ab2f648
commit
5d8e5b25b3
1 changed files with 29 additions and 23 deletions
|
@ -123,8 +123,11 @@ class FileCacheUpdater {
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _cacheRemote(Account account, File dir, List<File> remote) {
|
||||
return appDb.use(
|
||||
Future<void> _cacheRemote(
|
||||
Account account, File dir, List<File> remote) async {
|
||||
final s = Stopwatch()..start();
|
||||
try {
|
||||
await appDb.use(
|
||||
(db) => db.transaction(
|
||||
[AppDb.dirStoreName, AppDb.file2StoreName], idbModeReadWrite),
|
||||
(transaction) async {
|
||||
|
@ -148,6 +151,9 @@ class FileCacheUpdater {
|
|||
AppDbDirEntry.toPrimaryKeyForDir(account, remoteDir));
|
||||
},
|
||||
);
|
||||
} finally {
|
||||
_log.info("[_cacheRemote] Elapsed time: ${s.elapsedMilliseconds}ms");
|
||||
}
|
||||
}
|
||||
|
||||
/// Remove extra entries from local cache based on remote contents
|
||||
|
|
Loading…
Reference in a new issue