Merge pull request #86 from edmorley/python2-pickle-perf
Use cPickle with Python 2 again, to fix v1.54 performance regression
This commit is contained in:
commit
7feed83fcb
|
@ -49,7 +49,6 @@ from __future__ import print_function
|
|||
|
||||
import binascii
|
||||
import os
|
||||
import pickle
|
||||
import re
|
||||
import socket
|
||||
import sys
|
||||
|
@ -59,6 +58,12 @@ import zlib
|
|||
|
||||
import six
|
||||
|
||||
if six.PY2:
|
||||
# With Python 2, the faster C implementation has to be imported explicitly.
|
||||
import cPickle as pickle
|
||||
else:
|
||||
import pickle
|
||||
|
||||
|
||||
def cmemcache_hash(key):
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue