Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit data (size) can be stored in a javascript array.

Tags:

javascript

How much data (As in size) can be stored in a Javascript array? All of my data are float values. I am trying to cache all of the data that server sent to web app client in array first and then read it from that array every second to render it in plot. This way I will render multiple points at a time and won't have to rend a point every time new data point arrives (which is actually every 20ms)

Please suggest.

like image 806
Andy897 Avatar asked Oct 07 '12 05:10

Andy897


2 Answers

The exact maximum limit of an array is 2^32 - 1 or 4294967295, due to restrictions in Javascript's memory. The number of items, also known as the length property, cannot be greater than that. Check this: http://4umi.com/web/javascript/array.php for more details.

like image 52
Mils Avatar answered Oct 06 '22 00:10

Mils


as the size of integer data type, because length property is of integer data type, it cannot be greater than that. i.e.2^32

like image 33
Ravindra Bagale Avatar answered Oct 06 '22 00:10

Ravindra Bagale