From b93afa935e33466b31f6ede2c5b87e691fb8b0cc Mon Sep 17 00:00:00 2001 From: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com> Date: Mon, 14 Sep 2026 21:10:12 -0700 Subject: [PATCH] perf: increase sync batch sizes --- src/tagstudio/core/library/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tagstudio/core/library/sync.py b/src/tagstudio/core/library/sync.py index 6a903050..3fad915d 100644 --- a/src/tagstudio/core/library/sync.py +++ b/src/tagstudio/core/library/sync.py @@ -142,7 +142,7 @@ class LibrarySyncEngine: def save_new_entries(self) -> Iterator[int]: """Save the paths found on disk that don't have a Library entry yet.""" - batch_size = 200 + batch_size = 1000 library_dir = unwrap(self.library.library_dir) index = 0 @@ -171,7 +171,7 @@ class LibrarySyncEngine: def sync_entry_stats(self) -> Iterator[int]: """Refresh cached os.stat() metadata for entries already known to the Library.""" - batch_size = 500 + batch_size = 5000 index = 0 while index < len(self.paths_to_restat):