vercel/serve-handler

Room for micro-optimisation

ichiriac opened this issue · 0 comments

Hi,

I'm looking for an asset oriented server. Yours seems great, not tested yet but I saw something weird in the code here : https://github.com/zeit/serve-handler/blob/master/src/index.js#L751

You could make the check before creating the readable stream, 304 will be more efficient, and by the way, you don't destroy it before returning, it may keep open a file descriptor.

Hope it helps,
BR, Ioan