Profile the hot paths and catch any quadratic surprises before launch. ## Targets ### SpriteKit - [ ] **Time Profiler** during heavy farm scene activity: multiple plots animating + ambient NPCs (butterflies, birds, avatar wandering, pet wandering) - [ ] Confirm 60fps on iPhone 12-era devices, 120fps on Pro devices - [ ] Identify any retain cycles or main-thread blockers ### SwiftData - [ ] Seed an in-memory store with 1000+ `HabitLogEntry` rows, 100+ `Task` rows, 20+ `Goal` rows with `SubGoal`s - [ ] **Time Profiler** the daily tick (`SystemEventsHandler.runDailyTick`) — should be well under 100ms - [ ] **Time Profiler** the Stats screen queries (depends on #31) — should not block the UI thread - [ ] Profile `QuestInteractor.candidatePool` at large data volumes ### Launch - [ ] **App Launch** instrument: cold launch under 1s on iPhone 12, under 500ms on Pro - [ ] No work done synchronously in `AppEnvironment.bootstrap` that should be deferred ## Acceptance criteria - [ ] No frame drops below 60fps during normal farm-tab usage on supported devices - [ ] Daily tick runs under 100ms even with 1000+ entries - [ ] Cold launch under 1s on iPhone 12 - [ ] Any findings documented + fixes filed as separate issues
Profile the hot paths and catch any quadratic surprises before launch.
Targets
SpriteKit
SwiftData
HabitLogEntryrows, 100+Taskrows, 20+Goalrows withSubGoalsSystemEventsHandler.runDailyTick) — should be well under 100msQuestInteractor.candidatePoolat large data volumesLaunch
AppEnvironment.bootstrapthat should be deferredAcceptance criteria