I suppose you have seen this already :

http://trac.dojotoolkit.org/ticket/1727

I am in a middle of something else right now, so I had no time for a
comprehensive read ...

-- DBJ



On Apr 20, 8:29 am, Danny Tuppeny <[email protected]> wrote:
> Unfortunately none of your suggestions help - the leaks are within the
> jQuery source (mostly elements used temporarily and removed with
> removeChild).
>
> The problem is finding a way of removing the elements without leaking
> in IE.
>
> On Apr 17, 5:23 pm, DBJDBJ <[email protected]> wrote:
>
> > Well there is a lot of teams having same kind of problems. It seems we
> > all are very quickly reaching the point where we have to remeber a
> > simple fact : JavaScript is a scripting language performing behind a
> > web page on the browser side. (I know I sound pompous here )
>
> > When met with memory leaks and slow pages, what worked for us in 99%
> > of cases:
>
> > 1::  A simple iron rule: never have more than ONE instance of jQuery
> > per page.
> > 1.1 :: use delete wherever and whenever you can
>
> > 2:: re-structure the pages so that dom is a ballanced tree. not flat
> > and not narrow and tall.
> > (this introduces span's which are for grouping purposes only.)
> > 2.1:: Instead of using $(selector,context) allways use $(context).find
> > (selector),  for speed.
>
> > 3 :: use event delegation everywhere.
> > 3.1 :: use live() and die() , and especially use die() in
> > window.onunload ...
>
> > None of this is a quick fix, unfortunatelly ...
>
> > PS: and yes, be 100% sure you know which plugins are included and why
> > and that they are of production quality.
>
> > -- DBJ
>
> > On Apr 17, 4:14 pm, Danny Tuppeny <[email protected]> wrote:
>
> > > > There's not much to clean up as far as I understood the OP
>
> > > Yup. It's stuff from within the jQuery source, even if we don't run
> > > any code. But where to clean them up isn't really the problem - it's
> > > how they can actually be cleaned up. Some of the things causing leaks
> > > (eg. the root.removeChild(script) call) are there to remove things
> > > that were added to the DOM to test browser capabilities. They can't be
> > > left there (who wants random elements on their page created by
> > > jQuery?), but removing them just seems to cause leaks.
>
> > > This is a pretty serious issue for us - our app seems to be leaking a
> > > *lot* (we are using jQuery heavily and doing a *lot* of DOM
> > > manipulation in our app). Every single element leaked in our app
> > > appears to come from the jQuery source - they're mostly empty divs.
> > > There are quite a few places within the jQuery source (eg. offset)
> > > that create divs and remove them with removeChild (which leaks them in
> > > IE). I suspect 90% of them will be fixable in the same way. I just
> > > can't find a nice way to remove the divs without leaking. There's some
> > > stuf fon the web suggesting you can move things into a div then set
> > > it's innerHTML to an empty string. This would still leave an
> > > additional div in the dom, but on top of that, it doesn't seem to work
> > > in my tests!
>
> > > If anyone has any ideas (either short term hacks or proper fixes that
> > > could be put into the jQuery source), please do share!
>
> > > If I come up with anything I'll post back here.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to