JavaScript在IE浏览器中速度很慢,但在Firefox中很快 [英] javascript slow in IE but fast in Firefox

查看:181
本文介绍了JavaScript在IE浏览器中速度很慢,但在Firefox中很快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用IE访问此页面非常缓慢,但使用Firefox的速度要快得多。尤其是当我增加人的节点的数量。任何想法有什么不对?



http://thejit.org/static/v20/Jit/Examples/RGraph/example1.html



BTW:IE甚至很慢从本地文件系统访问。



在此先感谢,
George

解决方案

IE浏览器的JavaScript引擎比其他浏览器的浏览器要慢,至少在使用低于9的IE浏览器的时候是这样的。所以,如果你使用的是IE 6,7或者8,那现在你就知道为什么了。 / p>

像raynjamin说的那样,尝试使用

更新:让您了解快速IE与其他浏览器,我使用Sunspider 0.9.1在自己的电脑上做了一个基准测试。结果如下:
$ b $ pre $ - Internet Explorer 8:5039.8ms
- Firefox 3.6:967.9ms(加载扩展名)
- Chrome 9:276.3ms
- Opera 10.6:293.2ms
- Safari 5:397.0ms

正如您所看到的,至少在使用Sunspider测试时,IE 8比Firefox 3.6慢5倍,比Chrome 9慢20倍。这是一个巨大的差异,你可以看到IE 8并不是那么快。



更新2 :有一种方法可以使IE更快。存在名为 Chrome框架的插件。使用这个插件将使IE更快,因为它会使用Chrome的引擎。我没有亲自尝试过,但是我已经听到了很好的消息。


It is very slow to access this page using IE, but much faster using Firefox. Especially when I increase the number of nodes of people. Any ideas what is wrong?

http://thejit.org/static/v20/Jit/Examples/RGraph/example1.html

BTW: IE is even slow when accessing from local file system.

thanks in advance, George

解决方案

Internet Explorer's Javascript engine is slower than that from other web browsers, at least when using IE with versions lower than 9. So, if you're using IE 6, 7 or 8, now you know why.

Like raynjamin said, try testing IE using Sunspider.

The latest stable Firefox (3.6) is fast, but for example, Google Chrome is even faster. A browser's Javascript speed depends on its underlying implementation.

Update: to give you an idea of how "fast" IE is compared to other browsers, I've done a benchmark on my own computer using Sunspider 0.9.1. Here are the results:

- Internet Explorer 8: 5039.8ms
- Firefox 3.6:          967.9ms (loaded with extensions)
- Chrome 9:             276.3ms
- Opera 10.6:           293.2ms
- Safari 5:             397.0ms

As you can see, IE 8 is about 5 times slower than Firefox 3.6 and almost 20 times slower than Chrome 9, at least when using Sunspider tests. That is a drastic difference and you can see that IE 8 isn't all that fast.

Update 2: There is one way to make IE faster. A plugin called Chrome frame exists. Using this plugin will make IE faster since it will use Chrome's engine. I haven't tried it personally, but I've heard good things about it.

这篇关于JavaScript在IE浏览器中速度很慢,但在Firefox中很快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆