@eschwartz: yes, it took a while
Note that calling calibredb is now pretty efficient if you connect it to a running calibre server. Without a server for every invocation of calibredb, it would have to load the entire database. Now it just connects to a previously loaded database.