Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 726
Journeyman Avatar asked May 28 '11 06:05

Journeyman


2 Answers

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

like image 147
Paul Irish Avatar answered Oct 28 '22 14:10

Paul Irish


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.

like image 31
Seth Avatar answered Oct 28 '22 14:10

Seth