开发者

Profile javascript on iOS

My iPad javascript-based web-app is running rather slowly at times. Is there any way to profile the javascript 开发者_如何学运维code on a iPad?


The YUI Profiler is a js-only profiler that can grab the stats for you, you can then toss it back to your desktop machine to view it with flash charting:

YUI Profiler Page at Yahoo Developmer Network


If 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.

https://developers.google.com/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 command, but once its working, you'll have the full chrome developer tools interface available for debugging mobile.


If you're using a Mac, you can plug your iPad into your computer and choose your iPad from Safari's Develop Menu (you might need to enable it first), and it will allow you to profile JavaScript much like a desktop page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜