[OSM-dev] Experiment: AJAX and <canvas> based online editor
Jon Burgess
jburgess at uklinux.net
Tue Aug 22 00:07:10 BST 2006
On Mon, 2006-08-21 at 10:38 +0200, Joerg Ostertag (OSM Munich/Germany)
wrote:
> On Monday 21 August 2006 10:27, Nick Whitelegg wrote:
> > > > Thanks, tried that and it has made an *immense* difference. Looks like
> > > > this idea could be a goer... :-)
> > >
> > > Doesn't this make the memory used moch more?
> >
> > Does it? I can't see how it would make a significant difference. Isn't it
> > just a case of using an associative array rather than regular array?
>
> Yes, that's what I was thinking of. But I'd have called it hash.
>From what I have read, in the case that the array index is a positive
integer the storage is implemented as sparse array rather than a true
hash or associative array. The underlying storage may be some kind of
hash or tree structure, or whatever else has been dreamt up by the
developers of the JS engine. All we care about is that the JS engine can
quickly and efficiently add, delete, store and search entries by index.
What i'm fairly confident it will _not_ do, is simply pre-allocate
storage for all index values 0...MAX(id).
I'd be interested to try out any new version that you wish to make
available.
Jon
More information about the dev
mailing list