views:

38

answers:

0

How would you go about profiling a site/script in terms of determining if / what memory leaks occur? Basically, it's a mootools page (which has a built in garbage collector) that sports 2 sort-of cpu-intensive script elements. one of them scrolls some images left to right and back, the other rotates content of 3 elements with some built-in events.

the problem occurs when you leave the page running in IE for a few hours and try to navigate away, IE fires a "a script running on this page is non responsive or/and will cause ie to run slowly" warning as the garbage collector kicks in.

looking through memory usage, it does seem to be incrementing it ever so slightly (which can add-up over time). but there are no visible circular references, there is no inline javascript on elements, most variables and code are behind a closure.

what other causes for the error can there be? is using too much cpu time something IE would dislike?

one thing that may or may not be relevant is that the DOM injection order of the 2 scripts is basically elements to memory to new elements in memory etc - and finally injected into the DOM. I seem to recall a mention of that somewhere...

i have also tried ajax dynaTrace (there's no ajax) and it appears there may be a lot of events data stacking up.

ideas?