[Checkins] SVN: zc.zodbdgc/branches/dev/src/zc/zodbdgc/__init__.py Added an optimization to avoid unpickling when checking for blobs.
Jim Fulton
jim at zope.com
Fri May 29 16:22:30 EDT 2009
Log message for revision 100542:
Added an optimization to avoid unpickling when checking for blobs.
This is quite important and needs to eb moved to ZODB.
Changed:
U zc.zodbdgc/branches/dev/src/zc/zodbdgc/__init__.py
-=-
Modified: zc.zodbdgc/branches/dev/src/zc/zodbdgc/__init__.py
===================================================================
--- zc.zodbdgc/branches/dev/src/zc/zodbdgc/__init__.py 2009-05-29 18:24:24 UTC (rev 100541)
+++ zc.zodbdgc/branches/dev/src/zc/zodbdgc/__init__.py 2009-05-29 20:22:29 UTC (rev 100542)
@@ -287,7 +287,12 @@
if not seen.insert(name, oid):
continue
p, tid = storages[name].load(oid, '')
- if ZODB.blob.is_blob_record(p):
+ if (
+ # XXX should be in is_blob_record
+ len(p) < 100 and ('ZODB.blob' in p)
+
+ and ZODB.blob.is_blob_record(p)
+ ):
storages[name].loadBlob(oid, tid)
except:
print '!!!', name, u64(oid),
More information about the Checkins
mailing list