1

I'm generating plots with help of the JS library plotly.js. The data that is being used for plotting is retrieved by AJAX. In one particular case, around ~450MB is being retrieved through AJAX, to be used to generate those plots. The browser however, 'crashes'. It's not a timeout from the server because it's still running and it shows no errors in its logs (it's served by the django framework).

My question is, is 450MB of data too much to be loaded through AJAX? Or is this a Javascript problem? Is the processing of the data with this plotly library too much for the browser?

The computer that is making this request has 16GB or RAM of which 15.8 is available. It's using Chrome as the browser.

Alb
  • 1,063
  • 9
  • 33
  • Possible duplicate of [Is there a limit on how much JSON can hold?](https://stackoverflow.com/questions/1262376/is-there-a-limit-on-how-much-json-can-hold) – hindmost Feb 28 '19 at 11:15
  • @hindmost thank you. There's a subtle difference though. It answers one question but 2 others remain. Is this a Javascript issue or is the browser capacity, concerning rendering, limited? – Alb Feb 28 '19 at 11:19
  • Those questions are most likely off-topic to SO as "unreproducible" – hindmost Feb 28 '19 at 11:22
  • What do mean by crashes ? It maybe takes years to evaluate data ? – Shim-Sao Feb 28 '19 at 11:23
  • I've recently struggled with a big JSON file (about 15000 records) and some AJAX calls. My conclusion was that my server (PHP) was limiting the JSON file in the AJAX calls. There are several settings that can contribute to that (php.ini or htaccess): "max_input_vars" -> defaults to 1000 , "post_max_size" -> defaults to 24M, though I'm not sure, "max_execution_time" -> defaults to 30 – H. Figueiredo Feb 28 '19 at 11:28
  • @H.Figueiredo that's irrelevant. My server isn't limiting anything. 450MB of data is a lot more than 15000 records. – Alb Feb 28 '19 at 11:31
  • @Shim-Sao it takes approximately 5 minutes to retrieve the data. I've just tried loading this on a different computer (Linux in a virtual box with Chromium) and it worked. I suppose it's either a hardware limitation or OS-relevant? – Alb Feb 28 '19 at 11:32
  • Sure, but if you recieve the data by post, the "post_max_size" could be the cause. But if that's not the case, what do you mean by crashes? Freezes? Anyway, 450MB is a bit, considering your client will have to download that value each time (except for cached values). Your server Bandwith might also suffer . – H. Figueiredo Feb 28 '19 at 11:34
  • @H.Figueiredo it's not a server issue since I cannot reproduce the same error on a virtual box with linux on it. – Alb Feb 28 '19 at 11:36
  • 5 minutes = 300 seconds => 450MB/300sec = 1.5MB/s does not seem to be a low value to me. – H. Figueiredo Feb 28 '19 at 11:36
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/189194/discussion-between-albert-and-h-figueiredo). – Alb Feb 28 '19 at 11:38
  • Try to split your json and found the limit. – Shim-Sao Feb 28 '19 at 12:22

0 Answers0