Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-14-2014, 12:55 PM   #1
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
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.
kacir is offline   Reply With Quote
Old 11-14-2014, 09:49 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-15-2014, 07:09 AM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
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?
HarryT is offline   Reply With Quote
Old 11-15-2014, 07:17 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 11-15-2014, 07:32 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
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?
HarryT is offline   Reply With Quote
Advert
Old 11-15-2014, 07:33 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,249
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Right click the preferences button
kovidgoyal is offline   Reply With Quote
Old 11-15-2014, 07:34 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Thanks!
HarryT is offline   Reply With Quote
Old 11-15-2014, 09:01 AM   #8
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by HarryT View Post
Can you remind me how to run Calibre in debug mode? Run it from the command line and add a "-debug" parameter?
I personally use command
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.
kacir is offline   Reply With Quote
Old 11-15-2014, 09:30 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
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.
HarryT is offline   Reply With Quote
Old 11-16-2014, 04:45 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by kacir View Post
I personally use command
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.
I added the following script as
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
Then I just run via "calibre", or use the calibre.desktop launcher.

This way, I am ALWAYS in debug mode, just in case.

Last edited by eschwartz; 11-16-2014 at 04:50 PM.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:54 PM.


MobileRead.com is a privately owned, operated and funded community.