|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
|
Adding large number of books to Calibre got signifficantly faster. Thank you Kovid
Kovid,
you are master of the understatement. On the changelog page you write: "Add Books: Improve performance when adding large numbers of books at once" This is HUGE improvement. The books are, at the moment, being added more than order of magnitude faster. On my system I see more than 30 fold improvement in speed. Recently I have purchased an SSD disk, hoping that, among other things, adding books would be a little bit faster. There are many things that are much faster, but until recently I did not see any improvement in the speed of book adding. An hour ago I have upgraded to 2.10 and I was blown away with the speed increase. THANK YOU! Last edited by kacir; 11-15-2014 at 01:38 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,249
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You're welcome
![]() The improvement comes mainly from changing the algorithm to detect duplicates from an O(n) to an O(1) implementation (using a hash table). And making the detection use multiple processor cores. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Kovid, I've just experienced a problem which may be related to this.
I've done my usual weekly task of running "Kindle for PC", downloading the books I've bought in the last week (14 in total), and adding them to Calibre. When I did this, a ... certain plugin, which is a "File Type" plugin ... apparently randomly failed to work for some of the books that were added; they stayed as "AZW" files, rather than being converted to MOBI or AZW3, as is normally the case. I deleted the books, and re-added them. Same thing, but different books were successfully processed. I deleted the books again, and this time added them one by one: this time they were all correctly processed. Is it possible that the optimisation process you've added means that books are no longer being processed by file-type plugins? |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,249
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As far as I know file type plugins should continue to work normally. There were no changes to that part of the code. In fact the code to add them one by one is exactly the same as the code to add them in large numbers, its just that for single adds the large number is one. However, since I have no idea what that plugin does internally, I cant be sure.
Run calibre in debug mode and see if anything is printed out when the problem happens. |
![]() |
![]() |
![]() |
#5 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Thanks for the suggestion. I'll do it when I add books next week, and let you know. Can you remind me how to run Calibre in debug mode? Run it from the command line and add a "-debug" parameter?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,249
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Right click the preferences button
|
![]() |
![]() |
![]() |
#7 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Thanks!
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
|
Quote:
calibre-debug -g but I use Linux and I like to use console when looking into problems. You need the -g switch to start it in graphical user mode. |
|
![]() |
![]() |
![]() |
#9 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Tried the debug. The plugin in question generally prints a "Processing..." and a "Successfully processed..." message for each book, but when presented with a batch of books is now (for whatever reason) not getting as far as the second message - it's just silently failing. Not a Calibre problem - I'll ask elsewhere.
|
![]() |
![]() |
![]() |
#10 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Code:
~/bin/calibre Code:
#!/bin/bash if [ $# -eq 0 ] || [[ "$1" = "--detach" ]]; then echo -e "\n\n\nStarting calibre at $(date).\n\n\n" >> /tmp/calibre-debug-$USER.log 2>&1 calibre-debug -g 2>&1 | tee -a /tmp/calibre-debug-$USER.log else /usr/bin/calibre $@ fi This way, I am ALWAYS in debug mode, just in case. Last edited by eschwartz; 11-16-2014 at 04:50 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Glo Glo keeps getting stuck after adding a large number of books | Lofwyr23 | Kobo Reader | 16 | 05-18-2014 02:17 AM |
PRS-650 Using calibre to convert a large number of ebooks? | Gadgetguy | Sony Reader | 2 | 03-02-2011 01:00 PM |
Large number of books on memory card | pwalker8 | Sony Reader | 8 | 03-24-2009 02:20 PM |
PRS-505 with large number of books? | murraypaul | Sony Reader | 22 | 07-08-2008 01:23 AM |
Hanlin with large number of books? | murraypaul | HanLin eBook | 3 | 06-23-2008 06:54 AM |