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

查看:22
本文介绍了此页面上的脚本导致 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天全站免登陆