CSS3 PIE Forums
http://css3pie.com/forum/

IE8 Performance Issues
http://css3pie.com/forum/viewtopic.php?f=3&t=1446
Page 1 of 1

Author:  rjc [ Tue Dec 27, 2011 11:03 pm ]
Post subject:  IE8 Performance Issues

Hello,

I am having an issue with IE8 performance on the website i am working on, IE6, 7 and 9 all seem fine. The site uses PIE for some elements and the CPU usage particularly on older machines goes through the roof.

Not sure exactly how to debug it but am suspecting that PIE is polling on the page to heavily and killing the CPU. I guess i could try "--pie-poll" or something to disable it but i am assuming it was enabled for a reason.

Looking at the source code(1.0beta5 uncompressed version on line 398):
Code:
PIE.Heartbeat = new PIE.Observable();
PIE.Heartbeat.run = function() {
    var me = this;
    if( !me.running ) {
        setInterval( function() { me.fire() }, 250 );
        me.running = 1;
    }
};


It appears hardcoded to run every 250ms with a setInterval() call. This is fine if the page is simple and there are plenty of CPU resources available, but it needs to be less aggressive to avoid overloading the users computer.

Something like replacing the setInterval() call with:

Code:
   delay = 250;
   poll() { me.fire(); setTimeout(poll(), delay); }
   ...
   if (!me.running) {
       setTimeout(poll, delay);
   }


The advantage of above is if the fire() method is taking a long time to run because the page is complicated or CPU poor are still guaranteed 250ms of idle time between each call. Using setInterval() if fire() takes longer than 250ms the future calls will bank up causing the users computer to become unresponsive.

Author:  jason [ Wed Dec 28, 2011 1:57 pm ]
Post subject:  Re: IE8 Performance Issues

Sounds like a reasonable change. Feel free to submit a patch for it on GitHub.

Author:  emilystanfford [ Thu Dec 29, 2011 1:44 am ]
Post subject:  Re: IE8 Performance Issues

To start with, I'm running Vista x64 on a core 2 duo with plenty of hp and it is much faster than IE7. Even there (as with all current browsers) the speed difference isn't of the earth shattering type, but quite an improvement.

Author:  CSS_JS [ Wed Feb 01, 2012 9:02 am ]
Post subject:  Re: IE8 Performance Issues

I'm having the same issues when PIE is attached to many elements.

Does a patch for these IE8 and IE9 Performance Issues already exist?

Author:  webaware [ Tue Feb 07, 2012 11:51 pm ]
Post subject:  Re: IE8 Performance Issues

CSS_JS wrote:
I'm having the same issues when PIE is attached to many elements.

Does a patch for these IE8 and IE9 Performance Issues already exist?


You might want to just try turning the poll off. Polling is required for detecting when things move in IE8/9, but you can turn it off for elements that don't need this fix. See Lazy Polling in the doco. If it works, leave it off.

Author:  CSS_JS [ Wed Feb 08, 2012 6:16 am ]
Post subject:  Re: IE8 Performance Issues

webaware wrote:
CSS_JS wrote:
I'm having the same issues when PIE is attached to many elements.

Does a patch for these IE8 and IE9 Performance Issues already exist?
You might want to just try turning the poll off. Polling is required for detecting when things move in IE8/9, but you can turn it off for elements that don't need this fix. See Lazy Polling in the doco. If it works, leave it off.
With polling turned off PIE doesn't get applied in IE8 and IE9 to initially hidden elements, elements which change (on hover for instance) and elements added with Javascript.

Polling can be turned off when the Javascript solution to make PIE aware of the changes is implemented, see viewtopic.php?f=3&t=860 and viewtopic.php?f=3&t=1510

Author:  joop [ Wed Feb 20, 2013 3:26 pm ]
Post subject:  Re: IE8 Performance Issues

Hello. I'm experiencing performance issues with IE8 and PIE too. But in my case there's a carousel on one page and high cpu usage is observed only when this carousel is rolling. None of the elements inside this carousel has PIE's behaviour property and I'm already using -pie-poll: false; on every PIE-element on the page. IE9 and IE7 do fine with the same page (the cpu usage is very small).
Is there anything that can be done about it? I can provide the archive with the demo page if needed.

Author:  joop [ Sat Mar 02, 2013 2:54 am ]
Post subject:  Re: IE8 Performance Issues

Possible workaround for IE8 performance issue can be putting IE8 (and only IE8) into IE7 standards mode with this line in <head>:
Code:
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/