- spans are now tracked via a list of dicts instead of 2 lists
previously (simpler code)
- extend_year_spans() pregenerates all possible ranges at plugin setup
stage
- a BucketError is now raised if declared bucket format not accepted
When Model objects (Albums and Items) are loaded from the database a lot of time is wasted checking if the object is dirty and if fields are fixed or flexattr.
This change alow bypassing these checks when we know that the data is correct ; it should only be used when loading Model from the database.
With this, listing all tracks in my test database (8200 items) takes 4 seconds while it took 31 seconds previously.
The motivation for this is to increase the performance of template evalutation.
Previously, the `model._formatted_mapping()` method returned a dictionary that
served as the environment (mapping of variable names to values) when evaluating
a template. To populate the dictionary, we iterated over all keys in the model,
formatted the values, and assigned it to the dictionary. This meant we
formatted every field, even if the template did not require it.
With this commit `_formatted_mapping()` does not return a populated dictionary
but a proxy (or view) instance. The object only knows about the model and the
keys it provides the formatted view for. If a variable is requested by the
template it computes the formatted value on the fly.
The class-based approach has one additional advantage: In the future, we can
separate the formatting logic from the database logic.
Moved track, format, lyrics, etc. to separate div with id 'extra-detail'
so that theses can scroll independent of the main details(Title, Album, Artist).
Split the templates and javascript rendering objects accordingly.
This has a better scrollbar display than the previous commit.
The javascript `replace` method was previously being used, which worked in a hacky way.
But the more elegant way to do it, as suggested by minitech on this question http://stackoverflow.com/questions/23440298 ,
is to use CSS, and make the browser automatically display white-spaces using `white-space: pre-wrap`
The latest Travis updates seem to only install the requested Python.
Previously, we assumed we had all Pythons even when the requested Python was
the default.