Dealing w/ Large JSON Files
Dealing w/ Large JSON Files
![ninp0](https://secure.gravatar.com/avatar/c8da2bc83b298d3c2b76a57576d9b789/?default=https%3A%2F%2Fvanillicon.com%2Fc8da2bc83b298d3c2b76a57576d9b789_200.png&rating=g&size=120)
We're leveraging DataTables to consume a single json file containing static code analysis results, which can grow quite quickly (in some cases 10+ MB). This is achieved leveraging the "ajax" parameter w/in DataTables...code can be found here:
https://github.com/ninp0/csi/blob/master/lib/csi/reports/scapm.rb#L149
Needless to say when the json file is large it takes quite a long time for the DataTables UI to load (in the event it ever loads). Is there a way to load the JSON file incrementally (based upon pagination) or consume multiple smaller json files which can then be incrementally displayed? I hope this question makes sense (as I'm not thoroughly caffeinated yet).
Answers
Hi @ninp0 ,
This section of the FAQ should help, it discusses very techniques to improve performance,
Cheers,
Colin