View Single Post
Old 10-07-2014, 12:42 PM   #14
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: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kaufman View Post
Quote:
Originally Posted by chaley View Post
The only way I can see this happening is if calibre's cache of the metadata on the device is not being saved properly. If this happens then the first time you connect after starting calibre CC will send all metadata. It won't send it again until you quit and restart calibre. Is this what is happening?

I looked at calibre's code and on a mac the cache is in "~/Library/Caches" where the ~ character means your home folder. Does this folder exist? Is it synced between the two machines?
Aha, that explains it. The only thing I sync across devices is the book folder. Is there some reason that the Cache isn't/can't be stored in there as well?
I was looking for something that might explain what you are seeing. I don't think that the cache should be synced. There are too many ways that things can get bonkers if the cache from one calibre instance is used in another.

Am I correct in assuming that the libraries on the two machines are in fact the same library, synced by dropbox? In particular, they share the same metadata.db file? And that metadata.db file has not been "conflicted"? If so then I can't find any reason that the following steps shouldn't work
  1. On machine A, sync the device.
  2. On machine A: change nothing else
  3. On machine B: sync the device. This might or might not cause CC to send metadata to C.
  4. On machine B: change nothing else. At this point the caches should contain identical content.
  5. On machine A: sync the device. CC should not send metadata to C.

Quote:
Quote:
Originally Posted by chaley View Post
The only thing I have done that will have slowed down the "analyzing" phase is book syncing. If that option is on then calibre must check the date of every book file, which requires going to the disk. That could account for the 20 seconds being more than it was before.
Aha again. I tried turning off the copy new books, and the time drops from 20 seconds to about 5 seconds. Rather then checking the date each time, couldn't Calibre cache the last changed date and just compare that to the last sync date?

Is anyone updating their book files outside of Calibre? If not, this should work.
Lots of people modify books outside of calibre, using various tools and editors. In addition, as far as calibre is concerned the various plugins that change the book file are external programs. And finally, calibre makes no attempt to keep a date for the book files themselves. So no, the only way to get the changed date for a book is to check the date of the file.
chaley is offline   Reply With Quote