Reputation: 1031
We're trying to determine why one of our web app ends up getting the Mobile Safari app killed on the iPad (works fine in the Simulator or even on the iPhone).
Is it possible to profile a web application CPU/Memory usage by profiling Mobile Safari app via Instruments (either on the simulator, or even better on the device)?
Thanks!
Upvotes: 3
Views: 3517
Reputation: 8924
you can profile memory with instruments on the ios simulator if you find the MobileSafari system service in the choose target list when you have your mac selected as the target and the ios sim open. from there just track allocations and the vm tracker, and you should see how much ram is used in the vm tracker.
the iPad 1 has only 256 MB ram, ipad 2 has 512 and the ipad 3/4 have 1gb (though I think the maximum ram limit for any app is 650 MB). if your site is using more than any of these values then ios will kill the app if it can't reclaim enough memory from other inactive apps (though it will work fine on the sim obviously, this is just to get a general sense of things).
it may work on the iphone because the iphone's screen is much smaller, therefore there is less memory being used to actually store frames for display to the screen.
Upvotes: 0
Reputation: 891
You can maybe try in Instruments to open your profiling in the simulator and choose as executable somewhere in (User)/Library/Application Support/iPhone Simulator/ for MobileSafari.app. Or you may try to make an (simple) app that loads the webapp in a UIWebKit view and use Instruments for that.
Upvotes: 1