4 ms·
The streaming node.js example he wrote uses a blocking call. This is not the node way, and would cause a definite slow-down. If you're worried about your progr
by DTrejo 14y ago
The streaming node.js example he wrote uses a blocking call. This is not the node way, and would cause a definite slow-down.
If you're worried about your programs containing rogue & misbehaving code like this, I recommend you use https://github.com/isaacs/nosync https://github.com/isaacs/nosync
- nfriedly 14y agoI had the impression that "Node.js (readfile)", and possibly "Node.js" meant the blocking call but that "Node.js (streams)" meant he was using something like fs.createReadStream(). But you're right, I don't see that anywhere in the posted source.
- purplefox 14y agoI've tested several combinations of blocking, non blocking, readFile, streams (pipe) and using chunked transfer encoding. Results vary a little but all way below the Vert.x results. See blog post for the stats.
- nfriedly 14y agoFair enough. After I wrote that I remembered that readFile wasn't blocking anyways, but it was too late to edit at that point.