From: Pascal B. <pa...@dy...> - 2001-02-17 18:01:48
|
It would be strange if eventlisteners slow things down.. you would need alot of eventlisteners. Note that even though we call them listeners, there not listening all the time.. they are more handlers (and no, we're not renaming them) Everytime an invokeEvent('eventname') is done, the invokeevent function will walk thru the array of eventlisteners (just a simple array of objects) and see if the corresponding event is attached to it.. if it is, it will call that method of that eventlistener object. It doesn't make sense that it slows down so noticeable, do you have a url we can check to see it? q2. It might, not sure if normal javascript objects also increase the footprint (or just dynamically generated html objects). q3. Taskinfo seems to be a complete tool for memory/cpu timing: http://www.iarsn.com/ Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens David > Cushman > Verzonden: zaterdag 17 februari 2001 18:53 > Aan: dynapi widget > Onderwerp: [Dynapi-Widgetdev] NN6 and too many event listeners > > > Greetings, > First I know that we are not compatible with NN6 > yet, but I still test my pages and widgets under NN6. > NN6 has a tendancy to slow down to a crawl with > complicated DynAPI examples. One thing I have noticed > and tested is that the more active event listeners on > the page, the slower (or not at all) it goes. On my > menu widget, I started adding code in that removes the > event listeners when they are not needed. The > precreate listeners include a line at the end to > remove themeselves and the menu item listeners are > also removed and added when active. > Question 1 Has anyone else noticed this or has a > better understanding of what is happenning? > Question 2 Does removing and adding event listeners > increase the browsers footprint in memory each time > the add is executed? > Question 3 Can anyone suggest a good utility to > monitor the browsers footprint in memory? > > Cheers, > Dave C. "You Changed What?!?" > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > |