Comparing subsequent runs against each other

PatrickLongPatrickLong Patrick LongUSMember ✭✭

Whilst I cannot launch the Profiler with a device I can launch it with the Remoted Simulator. That's enough to highlight our current issue. We have a TabViewController in iOS that takes twice as long to load the same Record on iOS10 and iOS8 as it does on iOS9. This is also seen on the Simulator and I cannot see why in the hope we can make the load time the same on 8 and 10. To give you and idea, it takes 8 seconds to load the view on iOS10 and 4 on iOS9. This is the largest test record we have. Normally it is about 1 second

The Profiler logs for the entire execution of the app. I am only interested from the point were i select an Item in a parent TableView to the point the TabViewController loads

  1. Any suggestions for how I compare multiple runs of an app?
  2. I know that profiler can do snapshots but I'm not sure that is enough to allow me to isolate to the timings i need. Is it?
  3. Any bright ideas as to why the iOS9 version would be faster that 8 and 10. I could not find any iOS9 only code in the app. We do have some AutoLayout stuff that runs for iOS9 +

Thanks

Pat

Answers

  • RodrigoMoyaRodrigoMoya Rodrigo Moya ESXamarin Team Xamurai

    Right now, we don't have a way to compare multiple runs of the same app, but it is indeed a very nice feature to have, so we'll be looking at it at the next releases.

    Snapshots are more helpful when dealing with memory-related problems, but on the other hand, an application might be slower because it is allocating lots of objects and, thus, adding pressure to the GC. In your case, if that would be happening, given it is the same code, I guess it would be some native problem, so you might want to see what you can find out with Apple's Instruments. If that doesn't show up anything, and given it seems to be a timing problem, try profiling the app on the different iOS versions you want, and, as a first start, you might want to have a look at the Samples tab in the Time Profiler instrument of the Xamarin Profiler. That displays a summary of all samples (i.e where your app has been spending time), so you can compare the contents of that window for the different runs.

    Also, it might be helpful to use the pause/resume feature of the Xamarin Profiler, which would allow you to just store in the output file the specific data for the time span you want. With those output files (*.mlpd), you can use Mono's mprof-report and some scripting to compare the different runs.

Sign In or Register to comment.