disable compression on backup zips again
When backups were moved into a separate thread 5 years ago, it improved performance when switching between different profiles, as the backup happened in the background. But when closing Anki, we wait on the background thread to complete, so Anki hangs until the backup finishes. The performance difference on a large collection is considerable: - 0.45s without compression - 7.9s with compression Given that the majority of users probably aren't using multiple profiles, I think the speed increase is probably worth the extra disk usage. In the future, we may want to look into using zstd to compress the backups, which may even be a performance win over the uncompressed version on some devices.
This commit is contained in:
parent
872b6df22a
commit
d6aee9a0e2
@ -650,7 +650,7 @@ class AnkiQt(QMainWindow):
|
||||
pass
|
||||
|
||||
def run(self) -> None:
|
||||
z = zipfile.ZipFile(self.path, "w", zipfile.ZIP_DEFLATED)
|
||||
z = zipfile.ZipFile(self.path, "w", zipfile.ZIP_STORED)
|
||||
z.writestr("collection.anki2", self.data)
|
||||
z.writestr("media", "{}")
|
||||
z.close()
|
||||
|
Loading…
Reference in New Issue
Block a user