gpodder/detlef — pull request #63 by johanv (2014-02-02 22:28:44+00:00)
Title: Refs #61 - faster sync

I improved the sync time; it is now twice as fast.

Step 1: At the time the subscriptions are synced, for the remotely added podcasts, only the url is stored in the database. (I call this a podcast stub.)
Step 2: The podcast details (name, album art, ...) are stored at the time the feed is parsed to get the episode information (which is the directly after the subscriptions are synced).

Before this refactoring, each feed was completely parsed as well in stap 1 as in step 2. Eliminating one parse operation halves the time of a sync operation, because parsing large feeds seems to take a lot of time.

I created a new class 'PodcastSaver' with one static method, because I did not know where this particular method has to be defined. What it does, is checking whether the podcast already exists, and add it to the DB or mark it as remote if needed. This method is used by both PullFeedAsyncTask and SyncSubscriptionsAsyncTask.