amugofjava / anytime_podcast_player

Simple, easy to use Podcast player app written in Flutter and Dart.
BSD 3-Clause "New" or "Revised" License
403 stars 101 forks source link

Podcast refresh noticeably slow on lower-end devices. #52

Closed amugofjava closed 3 years ago

amugofjava commented 3 years ago

Describe the bug Refreshing large podcasts can be very slow.

To Reproduce Steps to reproduce the behavior:

  1. Refresh any podcast that contains a significant number of episodes.

Expected behavior The refresh to not take so long.

Additional context The issue is a result of all episodes in the feed being saved during a refresh, regardless of whether they have changed or not. This is causing unnecessary write overhead and is very noticeable on low end devices. This is a big issue when enabling background refresh for podcasts.

When saving an updated Feed, only new or changed episodes should be saved. Also need to check that expired episodes are removed.

amugofjava commented 3 years ago

Save routine has been improved to cut out unnecessary file writes for episodes that have not changed. Has noticeably improved the refresh time.