From 48647c76ddb6659c80aed73de17eb9182af2c06b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 May 2022 10:22:55 +0530 Subject: [PATCH] When cloning containers dont keep the parsed representations Saves RAM at the cost of having to re-parse if the container is re-used in the future. Fixes #1971150 [Epub Editor memory leak/improper memory handling with HTML renames](https://bugs.launchpad.net/calibre/+bug/1971150) --- src/calibre/ebooks/oeb/polish/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 20d4996ee4..1568725479 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -326,7 +326,7 @@ class Container(ContainerBase): # {{{ } def clone_data(self, dest_dir): - Container.commit(self, keep_parsed=True) + Container.commit(self, keep_parsed=False) self.cloned = True clone_dir(self.root, dest_dir) return self.data_for_clone(dest_dir)