3

Similar to xdebug+webgrind which gives us the rough time for execution for each function in a file etc, I am wondering how to go about optimizing as well as detecting slow javascript functions.

Am sure firebug can probably do this, but am not sure how? Can someone guide me as to how to detect memory leaks also? How do I decide if a function is too slow? I mean is there any benchmark, for e.g. in PHP i have a rough idea that any script which requires more than 200ms execution time, is kinda slow/maybe can be refactored. Roughly how many seconds should my code execute so that my browser experience is not sluggish? I know its a vague question... but are there any benchmarks?

Is there some kind of steps which I should follow before releasing code for public use?

Thank you very much for your time.

2

1 Answer 1

3

I think that Fireunit's function call profiling would be the best solution for optimization.

http://ejohn.org/blog/function-call-profiling/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.