Missing calls in the js flamechart.

34 views
Skip to first unread message

Birowsky

unread,
Jul 27, 2019, 3:50:31 AM7/27/19
to Chrome DevTools
Hey folks. 

Last time I was doing optimizations (maybe a year ago), I was able to see all possible function calls in the js flamechart.

Now, however, it doesn't seem to go all the way. 

Here's a long running function:

Screen Shot 2019-07-27 at 09.34.42.png



I'm expecting way more sub-calls so that I may understand why is it running so long.

Here's how that function looks like:

function updateIfNeeded() {
 
switch (state) {
   
case 'NO_REQUEST':
     
throw new Error('Unexpected draw callback.\n' + 'Please report this to <https://github.com/elm-lang/virtual-dom/issues>.');


   
case 'PENDING_REQUEST':
      rAF
(updateIfNeeded);
      state
= 'EXTRA_REQUEST';


     
var nextNode = view(nextModel);
     
var patches = diff(currNode, nextNode);
      domNode
= applyPatches(domNode, currNode, patches, eventNode);
      currNode
= nextNode;


     
return;


   
case 'EXTRA_REQUEST':
      state
= 'NO_REQUEST';
     
return;
 
}
}



While it is possible that this function might not call any other functions, it would not explain why it's running for so long.

Where is the button for my complete flamechart :}
Reply all
Reply to author
Forward
0 new messages