Journeyman
Journeyman

Reputation: 10281

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?

Upvotes: 9

Views: 2695

Answers (3)

Paul Irish
Paul Irish

Reputation: 49222

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

Upvotes: 3

Jack Greenhill
Jack Greenhill

Reputation: 10460

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.

Upvotes: 2

Seth
Seth

Reputation: 2796

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.

Upvotes: 2

Related Questions