View Single Post
Old 06-29-2024, 03:58 AM   #3
shadowstone
Junior Member
shadowstone began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kobo
Quote:
Originally Posted by kovidgoyal View Post
calibredb is fairly slow to startup mostly because of python interpreter startup lag. In addition it has to open and parse metadata.db on every invocation. You can get an idea of the breakup of times for these two tasks by contrasting the time taken for

calibredb --help
vs
calibredb list --limit=1

The latter of the two can be reduced by having calibredb connect to a running calibre-server instance. Or you can just use one of the JSON endpoint of the calibre server directly, which should be basically instantaneous. This does require keeping calibre running in the background. If you dont want to do that, you can just query metadata.db yourself using some sqlite tool. Getting a list of titles from it is pretty trivial, it involves simply reading the title column from the books table.
Thank you so much! Using sqlite really sped it up.
shadowstone is offline   Reply With Quote