From: Scott A. L. <sc...@sc...> - 2000-11-05 20:08:14
|
I've noticed that Netscape does have a memory leak here. Even though the physical layers are destroyed on a resize or reload, Netscape keeps incrementing the count until it dies. I don't think NS manages it's memory very efficiently in this regard. scottandrew -----Original Message----- From: Robert Rainwater <rra...@ya...> To: Rob Romanek <dyn...@li...> Date: Saturday, November 04, 2000 11:31 PM Subject: Re: [Dynapi-Dev] Updated dynlayer and dyndocument > > >> Hey I just threw this into my files fired up Netscape opened up the gui.menulist, and >> resized away...Yeah!!! the layers are recreated....but if I keep doing over and over, >> the redraw of the layers slow down, until at about the 10th time it stops redrawing, >> is the recreateall, reusing the previous layers or creating new ones? if it is >> creating new ones could it be the old ones are not being killed off and hence the >> slowdown and freeze as you clog the browser with layers >> >> If you reload or move to a new page and back everything is fine so hopefully, for now >> users won't resize 10 times while on the same page :-) > >Recreateall does actually recreate the layers in Netscape. And the >function that is used, createElement, could probaly use some more optimization. > >A lot of it could just be a Netscape memory allocation thing, too. But, I >see several places that the dynlayer can be fixed so that the creation >will speed up. Hopefully I fix some of these early next week and post >them. I haven't really tested my update to much, but hopefully >someone will find some optimizations as well. > >\\Robert > >-- > > >_______________________________________________ >Dynapi-Dev mailing list >Dyn...@li... >http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > |
From: Scott A. L. <sc...@sc...> - 2000-11-05 20:16:05
|
The original idea behind the two array was to have a flexible way to reference DynLayers and to provide a proper toString method so you can do away with the eval(this.obj + "=this") trick. all: - allows you to check for the number of DynLayers with the .length property - best when used with for (var i=0;i<all.length;i++) type loop - useful if you ever need an ordinal reference alID: - allows an instant check by ID (no loop needed) - best when used with for (var i in all) type loop - easy array element deletion: delete allID[obj.id] - used to return a consistent string reference: DynAPI.getDocument(id).allID[id] I agree it can be a pain to manage the two arrays. -----Original Message----- From: Robert Rainwater <rra...@ya...> To: DynAPI Dev <dyn...@li...> Date: Saturday, November 04, 2000 10:57 PM Subject: [Dynapi-Dev] Updated dynlayer and dyndocument > >I've updated the dynlayer and dyndocument so that the recreateall will >actually work. The biggest pain was adding children of children to >the all array in the addChild method. So I added a method addChildID >that should fix the problem. When a dynlayer thats knows its dyndoc >or a dyndocument itself calls addchild, then that child and all of its >children are added to the .all and .allID arrays. > >I've attached my dynlayer and dyndocument files. Please let me know >of any bugs/improvements because it hasn't been fully tested yet. > >Also, the method calls like oncreate that are hard coded into the >dynlayer need to be removed. Like: >if (this.onCreate) { this.onCreate() } file://<- > >The only problem is that they are used in some of the widgets. So if >we are going to remove these, everyone should make sure their widgets >use the eventlisteners instead. > >Also, could someone tell me the purpose of the .all array? I know we >need the allID array, but the all array I just don't understand. > > >\\Robert > >-- |
From: Robert R. <rra...@ya...> - 2000-11-05 20:33:02
|
Why not just store the count and have just an allID. In what cases do you need to access the array by its .all array? You can still loop through the allID array, but it wouldn't be necessary as much as it is now. \\Robert -- > The original idea behind the two array was to have a flexible way to > reference DynLayers and to provide a proper toString method so you can do > away with the eval(this.obj + "=this") trick. > > all: > > - allows you to check for the number of DynLayers with the .length property > - best when used with for (var i=0;i<all.length;i++) type loop > - useful if you ever need an ordinal reference > > alID: > > - allows an instant check by ID (no loop needed) > - best when used with for (var i in all) type loop > - easy array element deletion: delete allID[obj.id] > - used to return a consistent string reference: > DynAPI.getDocument(id).allID[id] > > I agree it can be a pain to manage the two arrays. |
From: Robert R. <rra...@ya...> - 2000-11-05 21:06:22
|
Actually, after looking more at dynlayer.js, there is no where that it is even needed. The only file that uses it is inline.js, but its not really needed there either. I think that the .children array should be associative as well. If it were, then the dynlayer could really be more efficient. It would just mean we would have to keep track of the count, but thats a small price to pay. \\Robert -- |
From: Pascal B. <pa...@dy...> - 2000-11-06 18:49:53
|
the UpdateValues is needed, to make all the properties like x,y, w,h set correctly for the inline layers. There's no need for the method to exist in the normal dynapi.js because it's only needed when the inline.js extensions are used. but it is used Pascal Bestebroer pa...@dy... http://www.dynamic-core.net -----Oorspronkelijk bericht----- Van: dyn...@li... [mailto:dyn...@li...]Namens Robert Rainwater Verzonden: zondag 5 november 2000 22:07 Aan: Robert Rainwater Onderwerp: Re: [Dynapi-Dev] Updated dynlayer and dyndocument Actually, after looking more at dynlayer.js, there is no where that it is even needed. The only file that uses it is inline.js, but its not really needed there either. I think that the .children array should be associative as well. If it were, then the dynlayer could really be more efficient. It would just mean we would have to keep track of the count, but thats a small price to pay. \\Robert -- _______________________________________________ Dynapi-Dev mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |