Reputation: 11125
Finally having completed an application, I am about to profile time taken to run javascript functions and optimize them but just that i don't know where to start.
Do i click the profile button after page loads or after i hit the enter in addressbar?
How do i find which is taking more time, instead of dwelling too much into unnecessary function codes.
Maybe some handy set of tips also will help me thanks:)
Upvotes: 0
Views: 1370
Reputation: 3986
As soon as you click the profile button, it starts recording. And once you click it again, it will stop recording and show you the results of your actions.
So it wouldn't make sense to load the page then hit profile, you would want to hit profile before you load the page so that it records all the js that was executed on load.
A good way to start profiling is to write down several use cases. Then profile each use case and go from there.
The percent and time columns can help you determine bottlenecks.
Upvotes: 1