There are 3 new tech talks from Apple on improving UI performance: 10855, 10856 and 10857

Render Loop

There are 3 pipelines. We only write codes on the App level, but it affects downstream.

  1. App
    A. Event Phase: Process events (touch etc), modify state
    B. Commit Phase: Layout and draw views
  2. Render
    A. Prepare Phase: Process layers, effects, animations
    B. Execute Phase: Draw layers and effects on GPU
  3. Display

New in Instrument

Instrument has a new template: Animation Hitches

It will show you the code that took too long to run.

New in Xcode 12

Inspect View Hierarchy and it now shows “Offscreens”. Certain operations are expensive as they require offscreen render, then copying back. Avoid offscreens if possible.

Xcode will suggest possible improvements.

Code to improve




Back to Home