开发者

performance issue in IE

开发者 https://www.devze.com 2023-01-05 10:18 出处:网络
开发者_如何学运维I have a website, which decently performs in FF and other browsers. but when it come to IE 7 and IE 8 (tested) the performance gets too slow
开发者_如何学运维

I have a website, which decently performs in FF and other browsers. but when it come to IE 7 and IE 8 (tested) the performance gets too slow

http://example.com/Mobiles/Blackberry-Bold-9000

any tips to improve performance in IE?


IE says you have errors on your page - try fixing those first
In addition, IE has Javascript performance of 20x worse than Chrome, so you are really going to need to optimize the &^%$ out of it.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; Windows-Media-Player/10.00.00.3990; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C) Timestamp: Mon, 28 Jun 2010 11:58:35 UTC

Message: Expected ';' Line: 1 Char: 14 Code: 0 URI: http://api.ak.facebook.com/restserver.php?v=1.0&method=fql.query&query=select%20url%2C%20total_count%20from%20link_stat%20where%20url%20in%20('http%3A%2F%2Fwww.ratingscorner.com%2FMobiles%2FBlackberry-Bold-9000')&format=json&callback=fb_sharepro_render

Message: '_onLoad' is null or not an object Line: 13 Char: 776 Code: 0 URI: http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US


I analyzed your site briefly using dynaTrace Ajax edition and from what I can see you are calling the Ready function 287,000+ in the around 10 seconds it takes to fully load the page, which accounts for about 70% of that time. I didn't trace your script so I don't know why. Nor do I know if this is IE running amok or that you are calling it that much on other browsers and it just executes faster.

In general, you are not caching enough. You are also serving almost everything off the same domain and would do well to at least move some of your images, js, and css to sub-domains or off a CDN.

Have fun.


I haven't looked at your site so this is more of a general answer than one specific to you. If you are adding lots of things to the page dynamically works better in IE to construct the entire HTML (as a string) first, then add it all at once rather than add individual elements one at a time. For example, say you get back a set of results via AJAX from which you are going to build a table. You could create the table and add it to the DOM, then construct the header and body, subsequently adding individual rows. In IE this could be very slow, I suspect because it uses an inefficient way to store (and thus access) the DOM. It works better to build up the table as a string, including header and body with rows, then add it all at once.

0

精彩评论

暂无评论...
验证码 换一张
取 消