admin管理员组文章数量:1332865
Javascript performance on mobile Safari (iPad) is much more sensitive for my application that it is on the desktop. Some operations that work super-smooth on the desktop take a while on the iPad, and I'd like to track down where the bottlenecks are. Is there some way to profile Javascript code on the iPad?
Javascript performance on mobile Safari (iPad) is much more sensitive for my application that it is on the desktop. Some operations that work super-smooth on the desktop take a while on the iPad, and I'd like to track down where the bottlenecks are. Is there some way to profile Javascript code on the iPad?
Share Improve this question asked Mar 21, 2011 at 22:37 Ben DiltsBen Dilts 10.7k18 gold badges60 silver badges86 bronze badges2 Answers
Reset to default 4If you have access to an Android phone, you can profile your application using desktop Chrome's developer tools and a USB cable (very convenient).
Android and iPhone behave+perform similarly, but not identically. That said, for 90% of use cases, if you improve performance on Android, you'll see the same improvements on iPhone.
Hour for hour, at least for the first pass of profiling, I think you'll get better results on iPhone using chrome+android to profile than using a less rich toolset.
https://developers.google./chrome/mobile/docs/debugging
It'll require Chrome, an Android device able to run the android Chrome app, and a USB cable.
You have to install and use the ADB console mand, but once its working, you'll have the full chrome developer tools interface available for debugging mobile.
You could try using a javascript profiling library (using timers for example) by a bit of searching I've found http://remysharp./2007/04/20/performance-profiling-javascript/ but since I didn't test it I can't tell you if its any good. You could place timers at various locations in your code and try to track down the bottlenecks that way.
(Js Microtime Library http://phpjs/functions/microtime:472)
本文标签: Profile mobile Safari (iPad) javascriptStack Overflow
版权声明:本文标题:Profile mobile Safari (iPad) javascript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742288860a2447427.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论