coverart-browser icon indicating copy to clipboard operation
coverart-browser copied to clipboard

fast startup of the plugin

Open fossfreedom opened this issue 11 years ago • 1 comments

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

  • http://stackoverflow.com/questions/2345151/how-to-save-read-class-wholly-in-python

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 avatar Dec 22 '13 23:12 fossfreedom

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.

fossfreedom avatar Jul 21 '14 08:07 fossfreedom