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(), after MS3TraceList.add_buffer() and MS3TraceList.add_filelike() for input of at least one block, and by MS3TraceList.trim_buffers(). The setting is process-wide.

Parameters:

nbytes (int) – Block size in bytes, 0 disables preallocation

Raises:
Return type:

None