On Sun, Jul 5, 2015 at 5:45 PM, Ω Alisson <
thelin...@gmail.com> wrote:
> What would you guys consider the maximum "safe" size for a JSON string to be
> parsed without blocking the event loop?
Every single line of javascript "blocks" the event loop, in some
sense. cpu intensive activity isn't a binary: blocking vs
non-blocking.
Measure the time to parse the kind of json you will get yourself, with
your deployment machine, and see what the time is (process.hrtime).
Then ask what the impact would be on your app, and what the maximum
transactions a second would be capped at with that time, and whether
that is acceptable.
5ms could be not much time... but it means your max TPS would be
200... if that's OK, that's OK.
--
http://StrongLoop.com makes it easy to develop APIs in Node, plus get
DevOps capabilities like monitoring, debugging and clustering.