Skip to content

perf: optimize first-launch startup and fix play button shader#24

Merged
joshhbk merged 1 commit intomainfrom
perf/optimize-first-launch-startup
Jan 9, 2026
Merged

perf: optimize first-launch startup and fix play button shader#24
joshhbk merged 1 commit intomainfrom
perf/optimize-first-launch-startup

Conversation

@joshhbk
Copy link
Owner

@joshhbk joshhbk commented Jan 9, 2026

Summary

  • Batch song loading - Add addSongs() method with O(n) duplicate checking via Set (previously O(n²))
  • Parallel initialization - Run authorization check in parallel with song loading
  • Queue prep before UI - Prepare playback queue before dismissing loading screen so Play is instant
  • Dynamic loading messages - Show "Loading your music..." → "Preparing playback..." for user feedback
  • Immediate play feedback - Emit loading state when Play tapped before queue ready
  • Fix shader clipping - Add clipShape(Circle()) to prevent white square behind play button

Test plan

  • Launch app fresh, observe loading messages change
  • Tap Play immediately after loading dismisses - should start within ~200ms
  • Verify play button has brushed metal effect (no white square)
  • Verify normal playback flow still works (pause, skip, etc.)
  • Run unit tests

🤖 Generated with Claude Code

- Add batch addSongs() method with O(n) duplicate checking via Set
- Parallelize authorization check with song loading
- Prepare queue before dismissing loading screen for instant Play
- Add dynamic loading messages for user feedback
- Emit loading state immediately when Play tapped before queue ready
- Fix play button shader clipping (add clipShape to prevent white square)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@joshhbk joshhbk merged commit 5703b80 into main Jan 9, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants