3 ms·
JSON.parse() is one issue we faced regularly. Any large amount of data fetching could block the event loop and the whole server slows down. It's very unforgivin
by neebz 10y ago
JSON.parse() is one issue we faced regularly. Any large amount of data fetching could block the event loop and the whole server slows down. It's very unforgiving.
We go great length to figure out which attributes to fetch and add limits to all our sql queries. These are best practices but with node they are must.
- beejiu 10y agoNode.js isn't great for CPU bound tasks in general.
- danenania 10y agoParsing json is sneaky because it can show up in apps that are otherwise IO bound (where Node shines) and don't seem like they should be CPU intensive on the surface.
- reaktivo 10y agoThere's always streaming json parsers[1] that will help you when parsing large json data sets. [1]: https://github.com/dominictarr/JSONStream https://github.com/dominictarr/JSONStream