@@ -105,7 +105,7 @@ cdef class Packer(object):
105
105
DO NOT USE THIS!! This option is kept for very specific usage.
106
106
107
107
:param int buf_size:
108
- The size of the internal buffer. (default: 1024 * 1024)
108
+ The size of the internal buffer. (default: 256* 1024)
109
109
Useful if serialisation size can be correctly estimated,
110
110
avoid unnecessary reallocations.
111
111
"""
@@ -118,7 +118,7 @@ cdef class Packer(object):
118
118
cdef bint autoreset
119
119
cdef bint datetime
120
120
121
- def __cinit__ (self , buf_size = 1024 * 1024 , **_kwargs ):
121
+ def __cinit__ (self , buf_size = 256 * 1024 , **_kwargs ):
122
122
self .pk.buf = < char * > PyMem_Malloc(buf_size)
123
123
if self .pk.buf == NULL :
124
124
raise MemoryError (" Unable to allocate internal buffer." )
@@ -127,7 +127,8 @@ cdef class Packer(object):
127
127
128
128
def __init__ (self , *, default = None ,
129
129
bint use_single_float = False , bint autoreset = True , bint use_bin_type = True ,
130
- bint strict_types = False , bint datetime = False , unicode_errors = None , buf_size = 1024 * 1024 ):
130
+ bint strict_types = False , bint datetime = False , unicode_errors = None ,
131
+ buf_size = 256 * 1024 ):
131
132
self .use_float = use_single_float
132
133
self .strict_types = strict_types
133
134
self .autoreset = autoreset
0 commit comments