"Augustus" <Imperial.Palace DeleteThis @Rome.com> wrote in
> "|-|erc" <gotchy DeleteThis @beauty.com> wrote in message
> > "Luke" <growler8NOSPAM DeleteThis @hotmail.com> wrote in
> > > Does anyone know what the maximum number of items (or characters)
> allowed
> > > is, in a javascript array?
> > >
> >
> > nope, but I've used up to about 50,000 elements with no problem.
>
> Isn't all javascript elements stored and executed on the users computer?
yes
>
> Just thinking that if you had that much stuff (using their RAM) and the web
> page was accessing it (using their CPU)... then wouldn't that have the
> potential to run extremely slow on somebody's computer if it was a
> slower/older model?
>
yes, try <a style='text-decoration: underline;' href="http://www.c-h-e-s-s.com" target="_blank">www.c-h-e-s-s.com</a> its the program in question, searches about 20,000
board positions. IE will timeout after 10 seconds so about every 3 seconds
it finishes the script then returns 1/10 second later on a timer, takes about
4 or 5 runs to make a move you can see the lightbulb flashing every time, that's
actually to get around the 10 second timeout.
Try selecting a menu option while its calculating.
IE will continue running if you select continue, but times out again at about 1 minute
and 10 minutes. IE must allocate some memory, the chess program is using
about 5 of these arrays.
But that's a processor intensive application playing chess, large arrays don't tax
the CPU generally. Its only about 100kb RAM, IE probably has 1MB or somewhere
around there allocated for javascript variables.
Herc<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Maximum number of items in a javascript array