R
Ray
Hello JavaScript experts,
I've been racking my brains for 2 hours and I still haven't figured
out this problem.
Basically, I have this page (an IE-only page), with a lot of
javascript files behind it, most of it not written by me. The problem
with this page is: once I use IE6 to load it, moving the mouse pointer
over the page will cause IE CPU usage to shoot up to 100%. Typing into
edit boxes a lot of characters quickly will also choke the CPU (and
the characters won't show up immediately, it took a few seconds before
the chars I type appear within the text box).
So, obviously something is catching keyboard and mouse related events
somewhere and doing useless, but intensive, processing.
And my guess is that since moving the mouse _anywhere_ within the page
(as long as it is within the browser window) jacks the CPU usage up to
100%, it's probably handled at the document level.
My question is, how do I find out the culprit? I tried this:
* Find all files with the text "document.attachEvent", I found them,
commented them out, still have the same problem. (Also, actually the
lines I commented out trap onkeyup and onmousedown, so it doesn't
explain the "moving-mouse-uses-100%-CPU" problem).
* There doesn't seem to be any API for finding out all the event
handlers attached to an element?
Thanks in advance for any pointers,
Ray
I've been racking my brains for 2 hours and I still haven't figured
out this problem.
Basically, I have this page (an IE-only page), with a lot of
javascript files behind it, most of it not written by me. The problem
with this page is: once I use IE6 to load it, moving the mouse pointer
over the page will cause IE CPU usage to shoot up to 100%. Typing into
edit boxes a lot of characters quickly will also choke the CPU (and
the characters won't show up immediately, it took a few seconds before
the chars I type appear within the text box).
So, obviously something is catching keyboard and mouse related events
somewhere and doing useless, but intensive, processing.
And my guess is that since moving the mouse _anywhere_ within the page
(as long as it is within the browser window) jacks the CPU usage up to
100%, it's probably handled at the document level.
My question is, how do I find out the culprit? I tried this:
* Find all files with the text "document.attachEvent", I found them,
commented them out, still have the same problem. (Also, actually the
lines I commented out trap onkeyup and onmousedown, so it doesn't
explain the "moving-mouse-uses-100%-CPU" problem).
* There doesn't seem to be any API for finding out all the event
handlers attached to an element?
Thanks in advance for any pointers,
Ray