I'm trying to pass very large arrays to JavaScipt to be manipulated client-side, and it's not working. These arrays typically have about 12,000 elements each, and this snippet of code is functioning correctly when I only plug in 2,000 elements.
<script type="text/javascript">
var getLenders = JSON.parse('<?php echo json_encode($getlenders); ?>');
var discountArray = JSON.parse('<?php echo json_encode($discountArray); ?>');
var getData = JSON.parse('<?php echo json_encode($sortedArray); ?>');
</script>
I increased the memory requirements of the server to 512MB (4 time as much as before) thinking that'd be more than enough, however it is still not working. Before I crank up the memory to 1024MB, I would like to know if there is any other reason this is not working. Could it be an issue with client-side memory?
Any input is appreciated.