Skip to content

UI lag during playback on lower-powered devices (iPhone SE 2) #1509

@matalvernaz

Description

@matalvernaz

Description

During audio playback, the UI becomes noticeably laggy on lower-powered devices like the iPhone SE 2 (A13 chip). This affects both the player screen and the library list view.

Root cause

Several progress-related publishers fire every ~1 second (from AVPlayer's periodic time observer) without any throttling:

  • PlayerViewModel.bindBookPlayingProgressEvents() — The .bookPlaying and .listeningProgressChanged notification subscribers call recalculateProgress() on every tick, updating ~6 @Published properties and triggering a full player view redraw each second.
  • ItemProgressView — Both currentProgressPublisher() (KVO on percentCompleted) and immediateProgressUpdatePublisher fire every second for the currently playing item with no throttle, causing every visible library row's progress ring to redraw.

The existing .folderProgressUpdated subscriber in ItemProgressView already has a 1-second throttle, but the other two publishers were missed.

Expected behavior

Smooth UI during playback on all supported devices.

Steps to reproduce

  1. Open BookPlayer on an iPhone SE 2 (or similar A13 device)
  2. Start playing an audiobook
  3. Navigate to the library list while playback continues
  4. Observe stuttering/lag in scrolling and UI interactions

Environment

  • Device: iPhone SE 2nd generation
  • iOS version: current
  • BookPlayer version: latest develop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions