Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How memory expensive is writing data to addressBook and CoreData?

I am updating an adress book app. I have a view were the user can edit the contact parameters, some of the parameters are saved in the address book and some in core-data entity. i have a dilemma with 2 options -

  1. write the changes immediately to the AddressBook and core-data and save the changes when the user press save button.
  2. only when the user presses the save button, read the final result of the changes,and then write it and save it to the addressBook and core data.

I find it hard to decide mainly because i don't know exactly what are the prices of each method? i find it easier to me to write the changes as they immediately, and i believe that in this way the UI will be more responsive as the usage of memory is divided to small operations.

thanks for any advice.

shani

like image 476
shannoga Avatar asked Oct 24 '22 21:10

shannoga


1 Answers

This should be easy to track with Instruments. It should be pretty easy for you to switch between the implementations and measure the difference

like image 156
nduplessis Avatar answered Oct 31 '22 09:10

nduplessis