Please help with writing spec for async JSON APIs

Michał Wadas michalwadas at gmail.com
Sun Aug 2 18:01:13 UTC 2015


Synchronous JSON parsing can block Node.js application. See following test
case -  Chromium native parser can handle up to 44MB per second on my
hardware. http://jsperf.com/json-parse-vs-1mb-json (BTW - I'm quite
impressed by V8 garbage collector). http://jsperf.com/json-parse-vs-1mb-json

It's enough to perform easy DoS on reasonably configured low-end server.

Anyway - I don't think that asynchronous parsing/stringifing would solve
this problem (it can solve some perfomance issues in WebSockets-based games
preventing frame-drop).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150802/600a40c8/attachment.html>


More information about the es-discuss mailing list