Forums
View unanswered posts | View active topics It is currently Tue Sep 30, 2014 4:21 am



Reply to topic  [ 8 posts ] 
 IE8 Performance Issues 
Author Message

Joined: Tue Dec 27, 2011 9:36 pm
Posts: 1
Post 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.


Tue Dec 27, 2011 11:03 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1443
Post Re: IE8 Performance Issues
Sounds like a reasonable change. Feel free to submit a patch for it on GitHub.


Wed Dec 28, 2011 1:57 pm
Profile

Joined: Thu Dec 29, 2011 1:40 am
Posts: 1
Post 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.


Thu Dec 29, 2011 1:44 am
Profile

Joined: Wed Feb 01, 2012 8:55 am
Posts: 7
Post 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?


Wed Feb 01, 2012 9:02 am
Profile

Joined: Mon Apr 11, 2011 4:54 pm
Posts: 53
Post 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.


Tue Feb 07, 2012 11:51 pm
Profile

Joined: Wed Feb 01, 2012 8:55 am
Posts: 7
Post 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


Wed Feb 08, 2012 6:16 am
Profile

Joined: Wed Feb 20, 2013 11:39 am
Posts: 2
Post 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.


Wed Feb 20, 2013 3:26 pm
Profile

Joined: Wed Feb 20, 2013 11:39 am
Posts: 2
Post 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" />


Sat Mar 02, 2013 2:54 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.