I could put the bulk metadata operations into a separate thread, but that wouldn't really solve anything. You shouldn't be doing anything else in calibre while a bulk metadata update is running as your data is in an inconsistent state. Moving to a separate thread will just mean you can display a progress bar while the user waits instead of a busy cursor.
Setting self.changed inside the loop doesn't matter. self.changed is read by the GUI only after the sync method terminates (remember it's happening in the GUI thread).
|