Chrome时间轴 - 我如何确定“重新计算样式”的原因?日志条目? [英] Chrome timeline - how can I determine the cause of a "Recalculate Style" log entry?

查看:411
本文介绍了Chrome时间轴 - 我如何确定“重新计算样式”的原因?日志条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome中使用内置时间线记录器分析页面,我看到重复的重新计算样式条目。他们没有明确的信息将他们链接到DOM元素或事件。



如何最好地确定这些条目的原因?

解决方案

我的建议是使用 Chrome加纳利构建的Chrome。 Paul Irish在Chrome Dev Tools 此处中使用时间线

您可以简单地点击事件,例如重新计算样式,并且您应该得到一个指向事件发生在代码中的小型堆栈跟踪。 p>

Profiling a page with the built-in timeline recorder in Chrome, I see repeated "Recalculate Style" entries. They have no obvious information to link them to DOM element or event.

How can I best determine the cause of these entries?

解决方案

My advice to you would be to use the Chrome Canary build of Chrome. Paul Irish has a good demo of using the Timeline in Chrome Dev Tools here

You can simply click on the event, for instance 'Recalculate Style', and you should get a miniature stack trace pointing to where the event occurred in your code.

这篇关于Chrome时间轴 - 我如何确定“重新计算样式”的原因?日志条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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