Thread: Calibre Speedup
View Single Post
Old 10-02-2012, 10:32 AM   #1
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,124
Karma: 5721184
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
Calibre Speedup

Sometimes people complain about calibre being slow. And it is indeed possible to make calibre slow down to a crawl by unknowingly asking calibre to do things that are very demanding if you have a large library.

Here are some things I have done to speed up calibre on my computer. A lot if this information comes from other threads here on the forum.

I haven't run any benchmarks, so I can't say exactly how much faster things are. But I think calibre is fast enough for me now...

Custom columns

(See: http://www.mobileread.com/forums/sho...d.php?t=188312)
  • Remove custom columns you don't need.
  • Avoid having custom columns that depend on other columns.
  • Avoid showing custom columns that depend on other columns in the tag browser.
  • Don't sort on custom columns that depend on other columns.

Custom columns that depend on other columns have to be "calculated" when you use them. For example when searching, sorting or using them in the tag browser. If you have a lot of books this can be very slow.

A special case is the "Formats" column many have and need. If you search or sort on formats calibre will scan every folder and book file in your library to figure out exactly what formats you actually have. It can be VERY time consuming if you have a large library on a slow disk.

Instead you can ask calibre to use stored information about the formats already available in the database. It will be much faster. But it may also be unsafe, since you then may not discover that files for some formats are missing, until it is too late.

To use the already existing stored data about the formats, in the database, change the custom column for formats to use {:'approximate_formats()'} instead of {formats}. If you often sort on formats then it will speed up calibre a lot. But at the cost of not warning when files are missing. You can perhaps compensate by checking the library more often.

Temp folder on the fastest disk

(See: http://www.mobileread.com/forums/sho...d.php?t=189593)

A more advanced speed-up is to make sure that the temp-folder for your operating system is placed on your fastest disk. Not everyone is comfortable to do this, it may make your OS unusable if you make mistakes...

As I understand it, when calibre converts formats, updates metadata, saves books to disk or sends books to a device, it first creates a temporary copy of the book in the temp folder. Depending on the format, the book may also be "exploded/unzipped," metadata changed, and finally the book may be zipped again. Then the book is copied to the new destination and finally the book in the temp folder is deleted. Also a temporary metadata.db may be created and updated in the temp folder.

Obviously it is best if all this happens on the fastest disk available.
I use Linux and have created a RAM-disk using tempfs and mount \tmp there. I have 16GB of RAM and use up to 8 GB of that as temp folder. It seems to speed up saves, send to device and bulk updates of metadata quite a bit.

Place metadata.db on a fast disk

(See: http://www.mobileread.com/forums/sho...d.php?t=189714)

Again this is not something everyone is comfortable with. It can be risky, and you may loose metadata, if you make mistakes.

I have my calibre library on a NAS. It is noticiable slower than my local SSD-disk. So I moved my metadata.db on to my local SSD and placed a symlink in the calibre library, where metadata.db used to be, to the moved metadata.db.


----

Do you know some other ways to speed up calibre? Please add more suggestions!
Attached Thumbnails
Click image for larger version

Name:	fastformats.png
Views:	280
Size:	38.4 KB
ID:	93228  

Last edited by Adoby; 10-02-2012 at 10:36 AM.
Adoby is offline   Reply With Quote