My guess is that the time is in tag_view.recount. It calls (indirectly) db.get_categories(), which takes time proportional to the number of tags/authors/publishers, etc. If a) there are lots of items, and b) not enough memory for sqlite to cache the DB, then get_categories will be slow.
@evilwarning: what sort of machine are you running calibre on? In particular, how much RAM do you have, and is your DB on a local disk or a NAS?
|