此页面上的脚本导致ie运行缓慢 [英] a script on this page is causing ie to run slowly

查看:88
本文介绍了此页面上的脚本导致ie运行缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题在于标题 - IE是行为不端,并且说脚本运行缓慢 - FF和Chrome没有这个问题。

The problem is in the title - IE is misbehaving and is saying that there is a script running slowly - FF and Chrome don't have this problem.

如何我能找到问题吗?那页上有很多JS。手工检查不是一个好的想法

How can I find the problem . .there's a lot of JS on that page. Checking by hand is not a good ideea

编辑:这是我正在进行的项目中的页面...但我需要一个找到问题的工具。

EDIT : It's a page from a project i'm working on... but I need a tool to find the problem.

结束:原来是UpdatePanel - 不知何故它会变得混乱并且需要太长时间处理一些事情。我把它扔出窗外 - 从现在开始只使用JQuery:D。

End : It turned out to be the UpdatePanel - somehow it would get "confused" and would take too long to process something. I just threw it out the window - will only use JQuery from now on :D.

我选择了Remy Sharp的回答,因为我真的不知道工具,看起来很酷。

And I'm selecting Remy Sharp's answere because I really didn't know about the tool and it seems pretty cool.

推荐答案

获取IBM Page Profiler的副本:

Get yourself a copy of the IBM Page Profiler:

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=61d74777-1701-4014-bfc0-96067ed50156

它是免费的(总是一场胜利)。在后台启动它,给它几秒钟,然后在IE中刷新页面。返回探查器,它将列出页面上使用的所有资源,并为您提供详细的配置文件信息 - 特别是JavaScript需要很长时间才能执行的地方。

It's free (always a win). Start it up in the background, give it a few seconds, then refresh the page in IE. Go back to the profiler and it will list out all the resources used on the page and give you detailed profile information - in particular where JavaScript is taking a long time to execute.

这应该是找到问题根源的良好开端。

It should be a good start to finding the source of your problem.

如果脚本标签是内联的,如果可以的话,我建议创建该文件的本地副本并将脚本标记分离为单独的文件。

If the script tags are inline, I'd suggest creating a local copy of the file and separating out the script tags to separate files if you can.

这篇关于此页面上的脚本导致ie运行缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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