I have a theory that #372 might be caused by growing memory allocations in small increments due to calling make with only the slice size and leaving the capacity allocation up to the runtime.
This PR modifies the encoding packages to always create slices with twice the capacity as the target size to ensure that we have room for growth when the memory areas are reused.
@mdisibio let me know if the change helps address the issue that you originally reported!
I have a theory that #372 might be caused by growing memory allocations in small increments due to calling
make
with only the slice size and leaving the capacity allocation up to the runtime.This PR modifies the
encoding
packages to always create slices with twice the capacity as the target size to ensure that we have room for growth when the memory areas are reused.@mdisibio let me know if the change helps address the issue that you originally reported!