From bb669f5994f0554a411061b28795a17e6b705031 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Fri, 19 Sep 2014 14:17:17 +0200 Subject: [PATCH] BigFile: allow to disable serialization to save space --- product/ERP5/Document/BigFile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Document/BigFile.py b/product/ERP5/Document/BigFile.py index 3576127359..d003dbd605 100644 --- a/product/ERP5/Document/BigFile.py +++ b/product/ERP5/Document/BigFile.py @@ -75,7 +75,7 @@ class BigFile(File): """ self._setContentMd5(None) - def _read_data(self, file, data=None): + def _read_data(self, file, data=None, serialize=True): # We might need to make this value configurable. It is important to # consider the max quantity of object used in the cache. With a default @@ -112,7 +112,8 @@ class BigFile(File): btree.write(read(next-pos), offset+pos) pos = file.tell() - self.serialize() + if serialize: + self.serialize() return btree, len(btree) def _range_request_handler(self, REQUEST, RESPONSE): -- 2.30.9