I am 99% sure that the speed problem is in calibre, but without a calibre debug log (not a CC one) I cannot be sure. You can get a calibre debug log by following
these instructions in our FAQ.
Are you running the latest version of calibre? There were some fixes in calibre v2.3 and later which made a large difference in performance. In particular, if you are running 2.4 or earlier then you really should upgrade.
Question: did you send me a debug log about duplicated books? If so, could you open another thread so we can discuss it?