我们如何调查浏览器进行了多少次回流? [英] how do we investigate how many times a browser is doing reflows?
本文介绍了我们如何调查浏览器进行了多少次回流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有 Web 开发人员功能/工具可以让我们知道浏览器进行了多少次回流?
Is there a web developer functionality/tool that allows us to know how many times a browser is doing reflows?
基本上我想要某种反馈/信息.我不知道它会如何,但也许是某种显示时间线的性能图(类似于 Google 的 Speed Tracer) 这样我就可以在浏览器突然进行大量回流的时候进行调查,这样我就可以指出嘿,这是一个瓶颈,这里或某事一定存在错误/错误实现.
basically I want to have some sort of feedback/information. I don't know how it will be, but perhaps some sort of performance graph that shows the timeline (akin to Google's Speed Tracer) so I can investigate when suddenly at a point the browser is doing an insane amount of reflows so I can point out hey here's a bottleneck, there got to be a bug/bad implementation of something here or something.
推荐答案
- Chrome 和 Safari 在 Web Inspector 中有时间轴选项卡,您可以在其中查看浏览器进行的所有重排和重绘.
- Firefox 有 MozAfterPaint 事件.它可以帮助您了解页面的哪些区域以及浏览器何时重新绘制.Firebug Paint Events add-on 在这里很有帮助.它在 FireBug 控制台中显示重绘事件.
- Chrome and Safari have Timeline tab in Web Inspector where you can see all the reflows and redraws made by browser.
- Firefox has MozAfterPaint event. It can help you understand which regions of the page and when repainted by the browser. Firebug Paint Events add-on can be helpful here. It shows repaint events in FireBug console.
这篇关于我们如何调查浏览器进行了多少次回流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文