icyleaf/halite

Add note saying that copying byte by byte is slow

bew opened this issue · 1 comments

bew commented

I think it's worth to add a note after https://github.com/icyleaf/halite#binary-data saying that the method used in the example to copy the body to a file is slow (byte by byte), it would be faster to copy chunk by chunk.

Use byte to byte will cost more memory and slow down the speed, here has no solution for now, the reason is Crystal only accept streaming by using block with HTTP::Client (search keyword: Streaming).

Updated, thanks.