Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Profiling

 Profiling

Chapter review from objc.io's Core Data book at Tumblr's iOS Book Club

Jasdev Singh

February 21, 2016
Tweet

More Decks by Jasdev Singh

Other Decks in Technology

Transcript

  1. SQL Debug Output The easiest way to gain insight into

    what SQL is doing under the hood of Core Data is to enable debug output by adding -com.apple.CoreData.SQLDebug 1 as a launch argument in the Xcode Scheme Editor.
  2. SQL Pro Tip Once you extract underlying queries from SQL,

    you can use SQL's EXPLAIN command to get a further breakdown on the execution plan for it.
  3. Threading Guard Add the launch argument, - com.apple.CoreData.ConcurrencyDebug 1 to

    have Core Data throw an exception whenever a managed object or managed object context are accessed from the wrong queue.
  4. Summary 4 Launch flags to help investigate issues 4 Pair

    SQL output with EXPLAIN 4 Core Data instruments are !