View Single Post
Old 06-21-2020, 11:05 PM   #1
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
calibredb very slow after large metadata edit

Hi All,

I've found lately that when I edit a large number (thousands, possibly hundreds) of titles in my library, the next add I do via calibredb can take a long time.

Usually adding a new title (which consists of adding the book with one calibredb call and updating a bunch of metadata fields with a second) takes about 10-12 seconds on a 30,000-title library.

After a large edit, I've seen it take about five minutes to add the first title after this, then go back to the 10-12 seconds per title.

Today, I I updated a few thousand titles: I removed my 'new book' tag, and used the regex engine to copy part of the title into a custom field. No change to author or title... and calibredb ran for two hours on the first title I tried to add after that, before I killed the job.

I can add a title to another library using calibredb and it behaves normally (10-12 seconds... it's another 30,000-title library). I can add a title via the calibre GUI and it takes just a few seconds (but of course doesn't have all the metadata the script is setting). It's only when trying to use calibredb to add a new title to a library that has had a large metadata change that I see this.

Addition: if I move the target library (rename the folder) and create a new library with the same name and custom fields, I can load into that one normally (each title takes about 8-9 seconds, with the two calibredb calls). Moving the titles from one library to the other takes very small time (2-3 seconds?).

When I switch the libraries back, the load time becomes immeasurable again. I do hear a lot of disk activity while calibredb is running, but it seems it never gets past the first file. (And yes, I did try removing that file -- in fact, it loaded via the GUI just fine, and the next file could not be loaded.)

Any thoughts?

Last edited by kjdavies; 06-21-2020 at 11:18 PM. Reason: added more information
kjdavies is offline   Reply With Quote