MutterCorp
MutterCorpNotice · Notícias
Programação·

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

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.

Notícias sobre o mesmo assunto em outras fontes