belyalov / tinyweb

Simple and lightweight HTTP async server for micropython
MIT License
252 stars 39 forks source link

exposed the buffer size as a param #47

Closed keredson closed 2 years ago

keredson commented 2 years ago

Hi,

I exposed the buffer size, which led to ~10x speedup in serving large files. (Well large for an esp32...) Default behavior is unchanged (with the exception that it won't create a buffer larger than the file being served).

for a 256k file: 128b buffer: 16s 1024b buffer: 2.7s 4096b buffer: 1.5s

Best, Derek

belyalov commented 2 years ago

Thanks for contribution! :) Merged