News for hackers. Stuff that matters.
Re:Why Nodejs serves a file with 80x more CPU usage than Nginx? by IsaacSchlueter on Monday April 09, 2012 @02:51PM (#3818576)
Sorry if my response was a bit overly strong. I know you're a good guy and we all just want these things to work well. I wasn't offended, just a bit confused by the results that weren't matching what I was seeing.

Of course, poking a bit further showed that converting a 16MB string to a buffer actually is quite expensive. You can avoid this by using buffers directly when you're serving files (or better yet, just pipe a fs.ReadStream directly into the response, so it'll stream it as it reads from disk, and buffer as little as possible.)

There are no comments on this comment yet.