Use pickle protocol 2.
This way, pickling gets %50 faster and takes %5 less space, unpickling gets about %30 faster
This commit is contained in:
+2
-2
@@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
# PiSi version
|
# PiSi version
|
||||||
|
|
||||||
__version__ = "1.1"
|
__version__ = "1.1_20070305"
|
||||||
|
|
||||||
__dbversion__ = "1.1_rc7"
|
__dbversion__ = "1.1_20070305"
|
||||||
__filesdbversion__ = "1.0.5" # yes, this is the real bottleneck
|
__filesdbversion__ = "1.0.5" # yes, this is the real bottleneck
|
||||||
|
|
||||||
__all__ = [ 'api', 'config', 'packagedb', 'installdb', 'search' ]
|
__all__ = [ 'api', 'config', 'packagedb', 'installdb', 'search' ]
|
||||||
|
|||||||
+1
-1
@@ -95,7 +95,7 @@ class DBShelf:
|
|||||||
raise CodingError()
|
raise CodingError()
|
||||||
|
|
||||||
def encode(self, obj):
|
def encode(self, obj):
|
||||||
return cPickle.dumps(obj, 1)
|
return cPickle.dumps(obj, 2)
|
||||||
|
|
||||||
def clear(self, txn = None):
|
def clear(self, txn = None):
|
||||||
def proc(txn):
|
def proc(txn):
|
||||||
|
|||||||
Reference in New Issue
Block a user