carllerche / tower-web

A fast, boilerplate free, web framework for Rust
MIT License
980 stars 51 forks source link

tower-web spends significant time copying data around #226

Open Jasper-Bekkers opened 4 years ago

Jasper-Bekkers commented 4 years ago

This is a relatively basic app that just listens to a HTTP POST request, to which I'm sending around ~2GB of data.

image

The framework seems to spends around 9 seconds copying data around, and around 6 seconds in generated code (the _IMPL_WEB_0 stuff).

This is on Windows, reasonably fast machine (i9, 16G of ram etc), copying the same file around in explorer takes round 2-3 seconds.