From: Michael P. <mp...@ph...> - 2001-02-18 12:58:26
|
I've found the following is a better removeFromArray. it doesn't require all the parsing removeFromArray : function(array, index, id) { var which=(typeof(index)=="object")?index:array[index]; if (id) delete array[which.id]; else for (var i=0; i<array.length; i++) if (array[i] == which) { array.splice(i,1); break; }; }, it uses the internal JS method of removing array elements. I'm sorry I didn't think to post this earlier. Pascal Bestebroer wrote: > I still think this is not a fair test.. > > simple example: DynAPI is maintaining a children array...see what it does > there. > > I find it very hard to believe that your tcanvas is faster then dynlayer, > because your using dynlayer's creation code. > Your just leaving out alot of code we've been putting in for the last couple > of months to make dynlayer easier and give if more functionality. > > I'll be doing some optimising test for dynlayer today (I think the > removeFromArray() part is a problem with the speed, and see if I can make > it faster.. but again your tcanvas has alot less functionality then the > dynlayer.. > > we could make a dynlayer-lite and it would probably match your speed (or be > faster, because there's still room for optimisation in your creation code by > not calling the sethtml function, but just incorporating that code into the > create) > > I'll let you know > > Pascal Bestebroer > pa...@dy... > http://www.dynamic-core.net > > > -----Oorspronkelijk bericht----- > > Van: dyn...@li... > > [mailto:dyn...@li...]Namens Eytan Heidingsfeld > > Verzonden: zaterdag 17 februari 2001 21:26 > > Aan: dyn...@li... > > Onderwerp: RE: [Dynapi-Dev] TCanvas vs. DynLayer > > > > > > Included in the zip yet again > > tcanvas.js > > and > > browser.js > > > > and the test for DynLayer and TCanvas with nesting and without > > called: > > stress.dynlayer.create nested wtime.htm > > stress.dynlayer.create wtime.htm > > stress.canvas.create nested wtime.htm > > stress.canvas.create wtime.htm > > > > 8an > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev -- Michael Pemberton mp...@ph... ICQ: 12107010 |