View Single Post
Old 02-10-2019, 02:53 PM   #2
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,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
There is a similar system already in place.

When you update metadata then the updates are saved in the calibre library database file. The updates are usually not saved to the book formats. An exception to this is if you update the most basic metadata; Author(s) and Title. Then folders and files are renamed and moved around, as needed. That can take a while.

This means that you should strive to get Author(s) and Title right at once as you add books to calibre. And then not change those fields. All(?) other updates are only stored in the database, so they are really fast. Later, when you convert, send books to devices or save to disk, then the updated metadata in the database is applied to the actual books. The actual ebook files. .epub .mobi and so on.

The calibre library database file takes up relatively little space. That means that it can be stored separate from the rest of the library, for instance using shortcuts, on a fast disk. For instance on a system drive SSD. Or even, if you are very brave or very stupid, on a RAM-disk. This may improve performance when you change metadata.

When ebook files later are updated with the metadata, from the database, they are unpacked, updated and repacked. This is very "expensive" and it takes place in the TEMP folder. You can speed things up by making sure the TEMP folder is on the fastest drive or even on a RAM disk.

Some of these things can also be controlled with special environment variables that calibre recognizes:

CALIBRE_TEMP_DIR - sets the temporary directory used by calibre

CALIBRE_OVERRIDE_DATABASE_PATH - allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder.

https://manual.calibre-ebook.com/customize.html#id1
Adoby is offline   Reply With Quote