Stream or buffer image uploads to sharp? Peak memory, measured

Streaming an upload into sharp saved me about 9% of peak memory, not the order of magnitude people expect. Eight parallel uploads of a 65.5 MB PNG peaked at 1,533 MB when I buffered them and 1,398 MB when I piped them. The same eight uploads were refused at 85 MB by checking Content-Length before reading a byte. The cheap check beat the clever one. Below is the server I tested, the five cases, and what to put at the front of your upload route. Why would streaming not save memory? Decoding domin…
Publicado no Notice. Categoria: Programação.
Leia também
Notícias sobre o mesmo assunto em outras fontes
- ProgramaçãoDev.to
Amazon and Zillow image URLs: what each size code returns, measured
- ProgramaçãoDev.to
The Flag Never Measured What the Agent Could See
- ProgramaçãoDev.to
Why AI Data Centers Are Pushing Up Memory Prices