Improved startup time by minimizing the number of SQL queries.
commita0b009ba5dbb3016c4d2d8800a87141394b4d451
authorJustin Forest <justin.forest@gmail.com>
Tue, 14 Oct 2008 16:54:04 +0000 (14 18:54 +0200)
committerThomas Perl <thp@perli.net>
Tue, 14 Oct 2008 16:54:33 +0000 (14 18:54 +0200)
tree036e1e4be142c5c0e9f739868f863fd9857e7278
parent6ddb4b5441e938ed2e5cdf10994506faff167251
Improved startup time by minimizing the number of SQL queries.

channels_to_model() was issuing 3 SQL queries per channel to
get episode statistics (the number of downloaded, new and unplayed
episodes).  This is now done with one query for all channels.
3 temporary views are created when the database is first open.

This not only affects the startup time, but also the time required
to finish a download, change settings -- everything that renews
the list of channels.
src/gpodder/dbsqlite.py
src/gpodder/libpodcasts.py