View Single Post
Old 07-25-2011, 06:11 AM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,728
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by phil_ga View Post
Searching from the tag browser is anything from 5 secs (which is ok) to 30 seconds - with the program appearing to freeze while it does so.
FWIW: searches from the tag browser are entirely in-memory. They do not touch the database and therefore should not touch the disk. For example, a search for a tag will loop through the library cache (the in-memory copy of the data from the DB), looking at the tags for each book. The compare takes (on my machine) .4 seconds for a search across 20,000 books for a tag that is applied to 24 books. That .4 seconds is roughly constant: it takes the same amount of time if the tag is on only one book. This is expected, because search must look at each book even if it finds nothing.

Searches on user categories are different. They must not only loop though the books, but must also loop through the categories. They can take much longer, depending on the number of items in the category.

Given that you are seeing times that are much larger than I see, I wonder if calibre is thrashing (unable to keep its cache in real memory as opposed to virtual memory). Do you have other programs running that are consuming memory? (You said not, but there is always something running.) Do you have odd virtual memory settings? While running searches, is the hard disk being used? It shouldn't be. If you run the same search twice, is it much faster the second time? If so, that indicates that the cache is being pushed out of physical memory.
chaley is offline   Reply With Quote