I have a massive JSON object (170k lines, around 130Mbs). When running
var stringified = JSON.stringify(jsonObj);
My node.js application hangs and then times out
How can I stringify such a large file without having it timeout?
I have a massive JSON object (170k lines, around 130Mbs). When running
var stringified = JSON.stringify(jsonObj);
My node.js application hangs and then times out
How can I stringify such a large file without having it timeout?
Turns out the problem wasn't a result of the large JSON, it was something else...
However, in the process I found that you can use lodash _.chunk to split the json into smaller parts for parallel processing.
var arr = _.chunk(largeObj, SIZE_OF_CHUNKS);