简体   繁体   English

如何加快IE7中的应用程序运行时间?

[英]How to speed up application running time in IE7?

We did an application using rails(2.3.4), ruby(1.8.2), MySQL, JavaScript, jQuery.我们使用 rails(2.3.4)、ruby(1.8.2)、MySQL、JavaScript、jQuery 做了一个应用程序。 This is handling minimum 6000 records.这是处理至少 6000 条记录。 We showing those records detail in table.我们在表格中显示了这些记录的详细信息。 In the beginning Mozilla taking 2m to load the whole page.一开始 Mozilla 需要 2m 来加载整个页面。 We did the cache, eager loading, indexes.我们做了缓存、预加载、索引。 Now Mozilla taking 25s to load the whole page.现在 Mozilla 需要 25 秒来加载整个页面。 But IE-7 taking 1m30s to load the page.但是 IE-7 需要 1 分 30 秒来加载页面。

We don't know why IE-7 taking too much of time.我们不知道为什么 IE-7 花费了太多时间。

  1. Any one can help us to detect the running time in IE-7 and tell your guidelines to improve performance in IE-7.任何人都可以帮助我们检测 IE-7 中的运行时间并告诉您提高 IE-7 性能的指南。
  2. Any add-on is available in IE7 to see the AJAX request time taken as like Firebug add on.在 IE7 中可以使用任何插件来查看 AJAX 请求时间,就像 Firebug 插件一样。

Use partial loading.使用部分加载。 Don't try to load the 6000 records at once, load them in smaller segments, when needed.不要尝试一次加载 6000 条记录,在需要时将它们加载到较小的段中。 Even 5 second loading is too long, not to mention the 25 seconds or 1m 30s.即使是5秒的加载也太长了,更不用说25秒或1m 30s了。

Oh and yeah, IE 7's JS engine just sucks.哦,是的,IE 7 的 JS 引擎很糟糕。

From Table Rendering - IE Blog :来自表格渲染 - IE 博客

When Internet Explorer encounters a table it measures all the content of the table before rendering so that it knows what the widths of the columns are to render the content correctly.当 Internet Explorer 遇到一个表时,它会在呈现之前测量表的所有内容,以便它知道列的宽度是多少才能正确呈现内容。 On the other hand Firefox uses a different algorithm in that it renders the table contents progressively before it has all been passed.另一方面,Firefox 使用不同的算法,因为它在表格内容全部通过之前逐步呈现表格内容。

You can improve performance by setting the CSS rule table-layout: fixed .您可以通过设置 CSS 规则table-layout: fixed来提高性能。 The renderer will then calculate the layout based on the first row of the table.然后渲染器将根据表格的第一行计算布局。

IE7 is slow, there's no real way of getting around that basic fact. IE7 很慢,没有真正的方法可以绕过这个基本事实。

I'm going to answer your second question (about debugging tools for IE7) because I don't think I can give any useful advice on your main point about actually speeding up IE7.我将回答你的第二个问题(关于 IE7 的调试工具),因为我认为我不能就你关于实际加速 IE7 的主要观点提供任何有用的建议。

Any add-on is available in IE7 to see the AJAX request time taken as like Firebug add on.在 IE7 中可以使用任何插件来查看 AJAX 请求时间,就像 Firebug 插件一样。

The first thing to try is IE8 or IE9.首先要尝试的是 IE8 或 IE9。 These browsers have a Developer Tools window (accessible via F12, just like Firebug).这些浏览器有一个开发工具 window(可通过 F12 访问,就像 Firebug)。 It isn't as good as Firebug, but it does do quite a bit, and it is a useful debugging tool.它不如 Firebug,但它确实做了很多,而且它是一个有用的调试工具。 It also has a feature which allows you to switch the browser into IE7-compatibility mode.它还具有允许您将浏览器切换到 IE7 兼容模式的功能。 The idea is that you can test IE7 from the relative comforts of IE8 or IE9.这个想法是您可以从相对舒适的 IE8 或 IE9 测试 IE7。

The down side is that it isn't actually IE7.缺点是它实际上不是 IE7。 It's just a pretend ID7, and not a particularly good one at that.这只是一个假装的 ID7,并不是特别擅长的。 It may or may not replicate the speed issues you're having with IE7, and it certainly has known bugs and quirks of its own which don't appear either in a real IE7 or in IE8 in normal mode.它可能会或可能不会复制您在使用 IE7 时遇到的速度问题,并且它肯定有自己的已知错误和怪癖,这些错误和怪癖不会出现在真正的 IE7 或 IE8 的正常模式下。

But all that said, it might be good enough for you to run some tests and get some answers.但话虽如此,运行一些测试并获得一些答案可能就足够了。

A second suggestion might be to try Firebug Lite .第二个建议可能是尝试Firebug Lite This is a cut-down version of Firebug which runs as a bookmarklet in any browser (but generally IE).这是 Firebug 的精简版,它在任何浏览器(但通常是 IE)中作为书签运行。 It doesn't have all the features of the full version of Firebug, because there's only so much you can do without writing a browser plug-in, but it does do a surprising amount.它不具备 Firebug 完整版的所有功能,因为您可以在不编写浏览器插件的情况下做很多事情,但它确实可以做很多事情。 If nothing else, it does give you the console functions, which can be a life saver for debugging.如果没有别的,它确实为您提供了console功能,这可以成为调试的救星。

I hope that helps.我希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM