[Zodb-checkins] CVS: ZODB3/ZEO - TransactionBuffer.py:1.7
Guido van Rossum
guido@python.org
Thu, 5 Sep 2002 22:45:07 -0400
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv5694
Modified Files:
TransactionBuffer.py
Log Message:
Improve (I *think*) the size estimates by at least filling in the
correct header sizes.
=== ZODB3/ZEO/TransactionBuffer.py 1.6 => 1.7 ===
--- ZODB3/ZEO/TransactionBuffer.py:1.6 Thu Aug 29 15:29:56 2002
+++ ZODB3/ZEO/TransactionBuffer.py Thu Sep 5 22:45:07 2002
@@ -53,9 +53,10 @@
self.pickler.dump((oid, version, data))
self.count += 1
# Estimate per-record cache size
- self.size = self.size + len(data) + (27 + 12)
+ self.size = self.size + len(data) + 31
if version:
- self.size = self.size + len(version) + 4
+ # Assume version data has same size as non-version data
+ self.size = self.size + len(version) + len(data) + 12
def invalidate(self, oid, version):
self.pickler.dump((oid, version, None))