|11-08-2011, 11:44 AM||#1|
Join Date: Feb 2011
Sorting/searching composite column causes slow startup [solved]
I just learned something interesting about about using composite custom columns, and thought I should share ...
(Or at least put it in the forum so I can re-learn when I have the same problem in six months and search for a solution)
Sorting/searching on a composite column requires evaluating all composite columns for all books, which can easily take several minutes on a large library.
Furthermore, calibre remembers (per library) the last few (default=5) sorts to enable nested sorts. The default behavior is that these last 5 sorts are all invoked whenever a library is opened (startup or switch library).
This isn't much of an issue if you're only using one library and leave it open, but if you're repeatedly switching libraries or starting/stopping calibre, it can be aggravating.
Use kiwidude's View Manager plugin (yea!), define a view that doesn't sort/search on any composite columns, and check the box to have it automatically applied whenever switching to that library (or restarting calibre).
You'll still have one slowdown the first time you use a composite column sort/search on an open library, but otherwise you can switch libraries at will.
1) Change the tweak "Set the maximum number of sort 'levels'". This will tell calibre not to sort on columns clicked some number of sorts back. The default is 5. Setting it to a smaller number will make calibre more quickly 'forget' about sorting the composite column.
Then, if you've used a composite column search, remember to click on a few 'normal' column headers before closing/switching libraries to clear the stack.
2) Change the tweak "Specify columns to sort the booklist by on
startup". This will force calibre to sort on known columns at startup
instead of the remembered columns. It also affects change_library. For
example, if you set the tweak to [('title', True)], then at startup your
library will be sorted by title only. The composite columns won't be
3) Use 'virtual libraries' i.e. search restrictions, rather than switching between libraries.
I found all this out (thank you chaley!) because I was inconsistently having really slow startups, and calibre was occasionally really slow when switching to large libraries.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Plugboard, template, and custom composite column recipes||chaley||Library Management||496||03-26-2014 02:10 AM|
|Composite column or not ?||Bertrand||Library Management||3||08-24-2011 01:27 AM|
|Library Sorting On Startup||hmf||Library Management||2||03-14-2011 02:08 PM|
|Need Help with Searching and Sorting||Archon||Calibre||5||12-13-2010 04:42 PM|
|Custom Composite Column||silentguy||Calibre||4||11-24-2010 10:28 AM|