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-28-2010, 08:17 AM   #1
cipri
Banned
cipri is on a distinguished road
 
Posts: 154
Karma: 70
Join Date: Nov 2010
Device: PB 903
More Speed with QT?

Edited

Last edited by cipri; 04-05-2011 at 10:07 AM.
cipri is offline   Reply With Quote
Old 11-28-2010, 09:01 AM   #2
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,357
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Uhhhh.... Qt is a graphics toolkit, not a programming language.

What language are you suggesting be used for the logic (database code, device interfaces, content server, etc)? Because you mention HAIKU, it is probably C++.

Rewriting calibre in C++ would be a multi-person-year effort. In the end, we would have something that might or might not be appreciably faster, but *would* be harder to maintain, harder to develop, and harder to debug. Hard to see why this would be a good thing, but perhaps I am confused.
chaley is offline   Reply With Quote
Advert
Old 11-28-2010, 09:18 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,453
Karma: 203840626
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
but *would* be harder to maintain, harder to develop, and harder to debug.
Not to mention harder to customize, and harder to write plugins for.

Being able to run Calibre from source is one of the biggest advantages that the newbie developer has at their disposal. You can literally be hacking and prodding within minutes.

Plus, the option to port a "Speedy C" version of Calibre is available to anyone who feels motivated in that regard.
DiapDealer is online now   Reply With Quote
Old 11-28-2010, 11:05 AM   #4
cipri
Banned
cipri is on a distinguished road
 
Posts: 154
Karma: 70
Join Date: Nov 2010
Device: PB 903
Edited

Last edited by cipri; 04-05-2011 at 10:08 AM.
cipri is offline   Reply With Quote
Old 11-28-2010, 11:06 AM   #5
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,240
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IMNSHO if calibre were in C/C++ it would be about 1/10th as capable as it is now, it would develop at 1/10 the speed and most probably I would have moved on to doing other things by now.

That said, if you want to improve the speed of calibre, do some profiling, find the bottlenecks. Once you do, it is always possible to write C extensions to speed them up.

calibre currently has about half a dozen extensions written in C to speed up certain operations.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-28-2010, 11:09 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,240
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sigh, yet another silly loop speed test. These are completely irrelevant to real world application performance.

[QUOTE=cipri;1240208]
Quote:
Originally Posted by chaley View Post
Rewriting calibre in C++ would be a multi-person-year effort. In the end, we would have something that might or might not be appreciably faster/QUOTE]

Look here at a comparision between the language Python and Cobra.
The result is devastating.

http://cobra-language.com/forums/vie...2&hilit=python

Here you see that in some cases Cobra can be hundrets of times faster than python.
I don't know both languages, because use exclusively c++, but the comparision between cobra and python, showes me that it could bring a lot of speed to have calibre written in c++, using QT.

python might be suitable for little programs, but calibre has to do a greater job.

And c++ is not always hard to maintain, it depends on the quality of the design.
kovidgoyal is offline   Reply With Quote
Old 11-28-2010, 11:21 AM   #7
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,357
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by cipri View Post
Look here at a comparision between the language Python and Cobra.
The result is devastating.

http://cobra-language.com/forums/vie...2&hilit=python
Note that in that 'benchmark', the variable x is not used. Any C++ optimizer would remove the assignment, then remove the expression because it isn't used, then remove all the loops because their indices aren't used, leaving the null program. No surprise that doing nothing is a lot faster than doing anything.

If you want to do such a port, go for it. However, better would be to do as Kovid suggested: find bottlenecks and either report or (preferable) fix them. Some users have done similar things and helped improve performance by large factors. The latest one was demonstrating that file system performance on some systems is terrible, and that huge benefits could be obtained by caching results of the cover existence test (a file_exists test) in the DB.
chaley is offline   Reply With Quote
Old 11-28-2010, 03:11 PM   #8
Evilwarning
Member
Evilwarning began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2010
Device: iPad
Hi

C/C++ will always be faster and i know depends on the programmer too but lets assume a good programer. This is the reason we write games and OS's in these languages, performance. They have two major drawbacks, heavily typed and hard to debug.

Maybe would be good to make some improvements but sometime rewrite is not the best option. I think the major step would be the use of a JIT like pypy, this would keep the easiness of coding with the performance of a compiled language.

My 2 cents
Evilwarning is offline   Reply With Quote
Old 11-28-2010, 05:20 PM   #9
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Wow. I wonder what all the people creating these threads would've said if they'd experienced Calibre before the drastic speedups of recent versions...
Manichean is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading speed tsantsa News 27 03-01-2010 02:38 PM
Speed Optimizations? SpiritualMadMan Calibre 10 12-24-2009 11:56 AM
Speed reading? Gatton Lounge 34 09-05-2009 11:14 AM
At what speed do you read? Colt Lounge 48 05-26-2008 07:44 AM
Speed splat iRex 4 01-05-2007 11:03 AM


All times are GMT -4. The time now is 03:57 PM.


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