[英]Javascript in IE8 very slow, IE7 + others fast using jQuery, jQuery UI, nyroModal
The page is rendered within an nyroModal (loaded via ajax) and the DOM is manipulated quite a bit using several plugins before actually showing the page. 页面在nyroModal(通过ajax加载)中呈现,并且在实际显示页面之前使用几个插件操作DOM。
Everything is fine in non-IE-Browsers and IE7, but in IE8 the resizable and draggable of an div is very slow and crawles along. 非IE浏览器和IE7中的一切都很好,但在IE8中,div的可调整大小和可拖动非常慢并且可以爬行。
I know IE8 is slow . 我知道IE8很慢 。 I know my DOM is big. 我知道我的DOM很大。 I know i use a lot of plugins. 我知道我使用了很多插件。 My question is, what exactly slows it down, as other Browsers do it well? 我的问题是,正如其他浏览器做得好,究竟是什么减慢了它?
I deactivated every plugin after each other to locate the culprit. 我在彼此之后停用了每个插件以找到罪魁祸首。 Only having resizable activated it is still slow. 只有调整大小才能激活它仍然很慢。
I used IE8 profiler and it says offset uses most of the time. 我使用了IE8分析器,它说大部分时间都使用偏移量。
EDIT: I analyzed the page using dynaTrace AJAX Edition and it showes me that these 2 functions are responsible for the most exec time: 编辑:我使用dynaTrace AJAX版本分析了页面,它告诉我这两个函数负责最多的exec时间:
jQuery.fn.offset = function(options)
and 和
jQuery.expr.filters.hidden = function(elem)
both in jquery.js 在jquery.js中
i read somewhere that IE8 has problems with offset, but how can i circumvent this? 我在某处看到IE8有偏移问题,但我怎么能绕过这个呢?
Edit2: I builded a test-page with just a link to open the page with all the resizing in a modal. 编辑2:我建立了一个测试页面,只有一个链接打开页面,所有调整大小都是模态的。 works nice also in ie8 ! 在ie8也很好用! so i guess the big DOM of the modal-parent-page is the problem. 所以我猜模态父页面的大DOM就是问题所在。
any advice appreciated! 任何建议赞赏!
检查您的浏览器是否未在IE7仿真模式下运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.