I recently read the following article by Stoyan about browser reflow. It takes in depth look about what is reflow and repaint, what impact on performance does it have and how to improve things. It also shows some third party tools which can help to visualize this.
I started to look if it possible to somehow detect reflows in the browser without third party tools and have some metrics based on this (for example in javascript I can calculate how many ajax calls has been fired).
Because my searches were unsuccessful, I am asking here if it is possible to calculate the number of reflows/repaints triggered on some actions? For example if I have a function
function foo(){
// trigger and manipulate some DOM elements
$.post( "ajax/test", function( data ) {
// do some manipulations with data and attach it to the DOM
});
}
I would like to know how many reflows/repaints has this function caused.
This question, also sounds similar is looking for a tool to do this (such tools are described in the article).