Search code examples
iphoneiosinstruments

iPhone is faster than Instrument tool's memory leaking check tool speed?


Currently i don't have an apple developer account ($99).

I am developing iOS app with searching function in iOS Simulator.

In simulator my app's search speed is not bad, just normal. But when i check my app for memory leaking with Instrument tool, my app's search speed is too slow and data load speed are also too slow.

I have to load 30 MB data in Start of app.In Simulator it's fast.But in Instruments , it's too slow and also took 6 seconds.

So i am worring about my apps to run on physical devices because of speed.

I would like to know , Is the iPhone physical device faster than Instrument tool's check memory leaking?


Solution

  • In my experience, normal execution on iPhone is much faster than profiling with Instruments. But, that heavily depends on the application and what "instrument" are you using. If your application does a lot of memory allocations, it will be very slow when using Instruments with "Allocations" settings.

    But also be prepared, that the iPhone Simulator is usually much faster than the real device. Your desktop CPU is usually x86 and over 2 GHz, but the device's parameters are lower. And also the architecture (ARM) makes the code to be compiled into more instructions than on x86, which also makes it a little bit slower.

    Anyway, you really should just go ahead, buy the developer account and test your app on the device, there's no other way to predict the performance. I guess the rule in your situation should be don't guess, measure.