Try to preallocate slices up-front instead of repeatedly reallocating.
Attach a file by drag & drop or click to upload