Child Windows spawn threads, javascript increasing CPU usage RRS feed

  • Question

  • I was hoping for some advice from the community.  We have recently discovered that one of our Javascripts that is used to provide security for child windows launched from our extranet application consumes a significant amount of CPU per child window.  The javascript is used to track to find out if the parent window is closed, and close itself (child window) if so, will set variables that are used for session timeouts, and add it's handle to a stack that is used to close each of the child windows if the parent window is closed. 

    For each child window a monitoring function is executing every 100ms, that will loop through each of the frames on the child window and replace any methods with a method that is used to inject this code for each child window.  We have found that this looping through the frames every 100ms is causing this increased CPU usage.  We have found that this problem does not occur in Firefox, which based on Microsoft investigations has pinpointed the reason to the way child windows are handled between browsers.  In Internet Explorer, each child window spawns another thread, in Firefox all child windows are in the same thread.

    Has anyone experienced a similar situation with their Javascript causing this increased CPU usage as a result of multiple threads in IE?

    Is there a way to adjust this threading behaviour in Internet Explorer?

    There was a significant increase in CPU usage when testing between IE 6.0 and IE 6.0 SP2 & IE 7.0, does anyone have any speculations of why that might be?

    Any advice would be greatly appreciated.


    Tuesday, November 14, 2006 9:10 PM