set_prealloc_block_size¶
- pymseed.set_prealloc_block_size(nbytes)[source]¶
Set the block size in bytes used to grow sample buffers, 0 to disable.
Sample buffers grow in blocks of this size while data is added, which avoids a reallocation per record. Buffers are trimmed to size after
MS3TraceList.add_file(), afterMS3TraceList.add_buffer()andMS3TraceList.add_filelike()for input of at least one block, and byMS3TraceList.trim_buffers(). The setting is process-wide.- Parameters:
nbytes (int) – Block size in bytes, 0 disables preallocation
- Raises:
TypeError – If nbytes is not an integer
ValueError – If nbytes is negative
- Return type:
None