fossfreedom / coverart-browser

Browse your cover-art albums in Rhythmbox v2.96 - 3.0+
http://xpressubuntu.wordpress.com/
GNU General Public License v3.0
74 stars 19 forks source link

fast startup of the plugin #235

Open fossfreedom opened 10 years ago

fossfreedom commented 10 years ago

Came across this stackoverflow Q&A about pickle and saving whole class data:

Looks interesting - is it possible to "pickle" the major data-loading classes such as those in coverart_album.py ?

Maybe concentrate on the album, tracks and model classes.

if it is - the plugin will effectively startup instantly without any major data-loading activities.

We'll need a "clear on next startup" option on the properties menu to allow a complete reload of data.

Anyway - quick tests on a very simple class shows that it works. However - really, this may be difficult to-do without some complex re-engineering. Add this as a wishlist item.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3217251-fast-startup-of-the-plugin?utm_campaign=plugin&utm_content=tracker%2F351726&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F351726&utm_medium=issues&utm_source=github).
fossfreedom commented 10 years ago

Doubtful pickle the correct way to go now. Lets look at TDB (we are already using this in coverart-search-providers).

Think about saving album & track info into the TDB - serialise the classes. Any updates causes updates to the database.