Rewriting Your Model, Undo and Threading One Step at a Time
summary
Argues for an incremental rewrite that swaps runtime KVO and handwritten encoders for generated model code plus immutable copy-on-write trees, and shows it actually works: 1,000,000 objects: KVO 30s vs manual 0.2s, immutable tree snapshots as undo history (undo becomes an array of shared immutable trees, constant-time restore), and codegen from the Xcode Core Data model editor + templates to remove runtime overhead and enable background-thread rendering with faulting.
AI-written summary · about
chapters (26)
- 0:00Introduction
- 2:00Backstory
- 5:00KeyValue Observing
- 6:00Undo Observing
- 7:00Undo Management
- 8:00Autosave
- 9:00The Solution
- 10:00Immutable Copies
- 13:00Sample App
- 15:00CoreData
- 16:00Templates
- 17:00Coma
- 18:00Undo
- 19:00Model Snapshots
- 20:00Undo Trees
- 21:00Memory Usage
- 24:00Faulting
- 25:00Wait a minute
- 26:00Pure Model
- 27:00One Step at a Time
- 28:00Swift
- 30:00Ship Changes
- 31:00Testing
- 32:00Optimizing
- 33:00Performance Issues
- 34:00Removing Features
related talks
34mImmutability: Putting The Dream Machine To Work
25mDriving View-State through Data for Fun and/or Debugging
33mScaling Swift Development
45mChanging attitudes toward legacy code
34mBe Predictable, Not Correct.
01h 14mMultithreading in UI application: When some threads are more equal than others
19mChange Detection Reinvented
32mThere and Back Again: Grokking State and Data
