admin管理员组文章数量:1435859
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.
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.
Share Improve this question edited Jan 21, 2010 at 21:36 Andreas Bonini 44.9k31 gold badges126 silver badges158 bronze badges asked Jun 5, 2009 at 5:45 Alec SmartAlec Smart 96.1k39 gold badges124 silver badges186 bronze badges 2- Duplicate of stackoverflow./questions/95326/… – Matthew Flaschen Commented Jun 5, 2009 at 5:49
- @Matthew: No. That one is only about IE. – Lightness Races in Orbit Commented Jul 1, 2011 at 14:32
1 Answer
Reset to default 3I think that Fireunit's function call profiling would be the best solution for optimization.
http://ejohn/blog/function-call-profiling/
本文标签: debuggingDetecting Javascript Memory Leaks amp Optimizing CodeStack Overflow
版权声明:本文标题:debugging - Detecting Javascript Memory Leaks & Optimizing Code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745669031a2669458.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论