From: Pascal B. <pb...@oi...> - 2000-11-01 07:43:35
|
A short test with some bigger code revealed some problems in my current speed-optimisation.. have to research them so don't use the previous code (was sleepy when I wrote it I guess :-) I'll see if I can fix the problems and still keep the speed increase Pascal Bestebroer pb...@oi... http://www.oibv.com -----Oorspronkelijk bericht----- Van: dyn...@li... [mailto:dyn...@li...]Namens Darin Kadrioski Verzonden: woensdag 1 november 2000 8:39 Aan: 'dyn...@li...' Onderwerp: RE: [Dynapi-Dev] Speed fix part II // with the above code I got a speed increase of 50% on 300 simple dynlayers That's a pretty phenomenal optimization! I wonder if there are any more hiding beneath the layers. Initiialization time has always been one my biggest problems using v2 (along with IE's apparent memory leaks! ;) Great work as usual, Pascal! -----Original Message----- From: Pascal Bestebroer [mailto:pa...@dy...] Sent: Tuesday, October 31, 2000 1:17 PM To: Dev Subject: [Dynapi-Dev] Speed fix part II Sorry for mailing so much into this list :-) but just looked at the setClip() some more and as I see it the clip() is always the same as the top;left;width and height values? then why use it? Only Netscape needs the values set, so for IE we could totally skip the setClip() method. IF the setClip() can be used in IE to set some other sort of clipping on/off (not sure what) then we could make another function that is called for setSize() methods (setWidth,setHeight) which does NOT call the old setclip, but a simple call for Netscape (making sure bottom,right,left and top values are set correctly). This seems to speed up things ALOT, here's another hack at the function: DynLayer.prototype.setClip=function(clip) { if (!this.created || is.ie || is.ns5) return var c=this.css.clip c.top=clip[0]||0 c.right=clip[1]||this.w c.bottom=clip[2]||this.h c.left=clip[3]||0 } For a function that is, in my opinion, rarely used it takes up way to much initialisation time.. with the above code I got a speed increase of 50% on 300 simple dynlayers (in a for-loop) that's on a P3 600, so not sure what other machines would do, and/or if IE4 behaves nicely with this code. Pascal Bestebroer pa...@dy... http://www.dynamic-core.net _______________________________________________ Dynapi-Dev mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-dev _______________________________________________ Dynapi-Dev mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |