jquery error() 调用显示在 firebug 配置文件中
我正在开发一个 ASP.NET 应用程序,该应用程序进行大量 jquery 和 javascript 调用,并尝试尽可能优化客户端代码。 (此 Web 应用程序仅设计为在内存和处理能力非常低的特殊硬件上运行。)
firebug 中的分析器非常适合找出哪些调用占用了最多时间。我已经优化了很多选择器,而且速度要快得多。
然而,配置文件显示了很多 jquery error() 调用。在 Firebug 配置文件窗口的附图中,您可以看到它被调用了 52 次,占处理时间的 15.4 倍。
jquery 像这样调用它的 error() 是正常的吗?我的代码运行完美,并且 Firefox 错误控制台中没有错误消息。这似乎对性能造成了重大影响。无论如何,是否可以获取有关错误内容的更多信息?
谢谢。
替代文本 http://img267.imageshack.us/img267/1730/jqueryerror.jpg
编辑:我没有使用/调用 error()我的代码中的任何地方。这些 error() 调用似乎是由 jquery 框架本身执行的,基于我所看到的插入断点并逐行单步执行应用程序的情况。
编辑:我正在使用 jquery 版本 1.4.2
I am working on an ASP.NET application that make a lot of jquery and javascript calls and trying to optimize the client side code as much as possible. (This web application is only designed to run on special hardware that has very low memory and processing power.)
The profiler in firebug is great for figuring out what calls are taking up the most time. I have already optimized a lot of my selectors and it is much faster.
However the profile shows a lot of jquery error() calls. In the attached image of the firebug profile window you can see it was called 52 times, accounting for 15.4 of the processing time.
Is that normal for jquery to call its error() like that? My code works flawlessy, and there are no error messages in the firefox error console. It seems like that is a significant performance hit. Is there anyway to get more info on what the errors are?
Thanks.
alt text http://img267.imageshack.us/img267/1730/jqueryerror.jpg
EDIT: I am not using/calling the error() anywhere in my code. Those error() calls seem to executed by the jquery framework itself, based on what I can see by me inserting break points and stepping through the application line by line.
EDIT: I am using jquery version 1.4.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要追踪这一点,您可以使用未缩小版本的 jQuery 并在
error()
中设置断点 - 这样您就可以看到它是从哪里调用的,并且您可以更好地理解什么正在发生。To track this down you could use an un-minified version of jQuery and set a breakpoint in
error()
- that way you could see where it is being called from and you may be able to better understand what is going on.