Search code examples
javascripthtmloptimizationrdfa

Javascript: Show time taken for each function to fun through browser


This is just a general question, is there a tool/addon for chrome & or firefox to that can either run through each javascript function run on that page and display a result on how long it took to run? or even better yet per line?

The probelm i having is that: i'm creating a visualization tool made through javascript. The user inputs html into a text area and that HTML is further passed into an iframe; as using a third party toolkit for extracting RDFa markup (green turtle) extracts from a HTML document.

Finally, the real issue being if the data inputted has alot of markup then the page simply just crashes. I'm trying to close down which function/code sections are really taking a long time to process to that i can optimize the code.


Solution

  • I have no idea if there is any tool/addon for chrome/firefox for your problem. But we can do it using some code. please refer: How to measure time taken by a function to execute