Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-23-2013, 10:06 AM   #1
Ansem_93
Enthusiast
Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.Ansem_93 could sell banana peel slippers to a Deveel.
 
Posts: 41
Karma: 3090
Join Date: Mar 2013
Device: Kindle 4
Column for see formats?

Hi at all, there is a method for creat a column for see what's the format of my ebook? I have a lot of books: pdf,epub,mobi. So i want see what's their formats (if it's more thant one) i one column

Last edited by Ansem_93; 03-23-2013 at 10:21 AM.
Ansem_93 is offline   Reply With Quote
Old 03-23-2013, 10:53 AM   #2
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,124
Karma: 5721184
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
Yes. You can add a column that shows the format(s) of the book.

http://manual.calibre-ebook.com/faq....column-for-foo

Warning: If you add this column, and you have a lot of books, you may find that calibre takes a long time to start. The reason is that all the formats of all books are checked every time you start calibre, in order to set the values of the column.

For a discussion about this problem, and a possible solution, see: http://www.mobileread.com/forums/sho...d.php?t=188312
Adoby is offline   Reply With Quote
Old 03-23-2013, 08:13 PM   #3
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,975
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
Interesting -I show a Formats Column but I don't have a problem with start times - unless my opening View is sorted by formats - which it never is

But the presence of the Formats Column is the cause of my 'scroll button feels like its in treacle' complaint. So... maybe my Formats Column has got to go.

Maybe the devs could put something indicating what formats exist for book into the database - and reconcile/fix in Library Check. But keep what's shown in Book Details as it is now - i.e. what's actually there

BR
BetterRed is offline   Reply With Quote
Old 03-23-2013, 08:41 PM   #4
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,259
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by BetterRed View Post
Interesting -I show a Formats Column but I don't have a problem with start times - unless my opening View is sorted by formats - which it never is

But the presence of the Formats Column is the cause of my 'scroll button feels like its in treacle' complaint. So... maybe my Formats Column has got to go.

Maybe the devs could put something indicating what formats exist for book into the database - and reconcile/fix in Library Check. But keep what's shown in Book Details as it is now - i.e. what's actually there

BR
Formats for a title do show in the Details pane.
You can Search for/with a format using the Tag Browser.

So Why the need to have them show all the time?
theducks is offline   Reply With Quote
Old 03-24-2013, 04:39 AM   #5
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,124
Karma: 5721184
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
Quote:
Originally Posted by BetterRed View Post
Maybe the devs could put something indicating what formats exist for book into the database - and reconcile/fix in Library Check. But keep what's shown in Book Details as it is now
It is already there.

Use {:'approximate_formats()'} instead of {formats}, and everything should be fine. At least if you only use calibre to delete or add book formats. Then approximate_formats() will retrieve the existing formats from the db, without any need to actually check the actual books.
Adoby is offline   Reply With Quote
Old 03-24-2013, 06:01 AM   #6
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,975
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by Adoby View Post
It is already there.

Use {:'approximate_formats()'} instead of {formats}, and everything should be fine. At least if you only use calibre to delete or add book formats. Then approximate_formats() will retrieve the existing formats from the db, without any need to actually check the actual books.
Thanks Adoby I didn't know about that, just added the column and happy to report that my database approx-formats accords 100% with the actual files, but...

When I removed the Formats column (see earlier post) my scroll bar stickiness disappeared, which 'made sense' - no need to interrogate folder contents.

So I turned computer off and went to lunch happy in the knowledge that my sticky scroll button niggle had been resolved/explained away.

When I came back I reinstated the Formats column and... the scroll bar stickiness did not come back, and... wait for it... sort on Formats column (theDucks, that's why I have it) on the whole library (20,000+ books) was almost instantaneous - it used to be a minute or two.

Maybe everything is 'cached', maybe my virus scanner is making Calbre faster, maybe I inadvertently hijacked the NSA computers. Own up Kovid, what did you do :lol:

its probably Heisenberg, or Eisenstein.

BR
BetterRed is offline   Reply With Quote
Old 03-24-2013, 07:34 AM   #7
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,124
Karma: 5721184
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
Are you sure you aren't sorting on the approximate formats? That might explain the speed boost.

I remember rebuilding databases over weekends to improve performance. Like defragmenting a harddrive. Not sure if sqlite benefits from that... Perhaps that was what happened when you removed and added the formats column?
Adoby is offline   Reply With Quote
Old 03-24-2013, 08:15 AM   #8
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,975
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by Adoby View Post
Are you sure you aren't sorting on the approximate formats? That might explain the speed boost.

I remember rebuilding databases over weekends to improve performance. Like defragmenting a harddrive. Not sure if sqlite benefits from that... Perhaps that was what happened when you removed and added the formats column?
Adoby, I did not know about approx formats until I read your post, my observations on improved performance occurred earlier - definitely on the {formats} variant. I now have both columns - scrolling performance is the same (i.e. good) irrespective of whether neither, either or both are displayed and sorting on either is the same too - damn quick.

If the formats column is based on the book folder contents then I wouldn't have thought sqllite database optimising would help much. It has to be something in the Windows NTFS file system - I haven't installed anything new - hardware or sofware.

Win 7 defrags on the fly, maybe its reached an optimal state so that my Library has become packed onto adjacent tracks - the amount of IO seeks appears to be very small as I browse the library. I click on a cover in the cover browser and the book pops up in a viewer more or less instantly.

BR
BetterRed is offline   Reply With Quote
Old 03-24-2013, 08:49 AM   #9
chaley
"chaley", not "charley"
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: 5,907
Karma: 1216548
Join Date: Jan 2010
Location: France
Device: Many android devices
The template {formats} is evaluated in several steps.

1) When {formats} is referenced for a book, check if it has been resolved and cached for that book. If so, return that value.
2) If the formats for a book have not been resolved, then verify the formats for the book. For each format:
- Check if that format has been resolved in the past. If so, use those values. This cache can be cleared if the content server is running and determines that its view of the database is out of date.
- If the format has not been resolved, do a "stat()" on the format file. Cache the path, the size, and the modtime of the format. Return these values. Return an empty record if the format does not exist.
3) If {formats} is never referenced, never do either step 1 or step 2.

The effects of the caches make getting consistent results from timing tests rather problematic. For example, sorting on {formats} will fill both caches. From that time forward, there will be no disk access. Which cache is used depends on the test.

The "treacle" test should be done in a way that ensures that the caches have not been filled. Something like:
- Ensure that the {formats} column is not in the startup sort set.
- Start calibre.
- Scroll down.

My guess is that calibre will be noticeably slower scrolling when there is a {formats} column. It must do a stat on each format for the book before it can display the book line. The approximate_formats() function avoids this work.
chaley is offline   Reply With Quote
Old 03-25-2013, 05:15 AM   #10
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,975
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by chaley View Post
The template {formats} is evaluated in several steps.

1) When {formats} is referenced for a book, check if it has been resolved and cached for that book. If so, return that value.
2) If the formats for a book have not been resolved, then verify the formats for the book. For each format:
- Check if that format has been resolved in the past. If so, use those values. This cache can be cleared if the content server is running and determines that its view of the database is out of date.
- If the format has not been resolved, do a "stat()" on the format file. Cache the path, the size, and the modtime of the format. Return these values. Return an empty record if the format does not exist.
3) If {formats} is never referenced, never do either step 1 or step 2.

The effects of the caches make getting consistent results from timing tests rather problematic. For example, sorting on {formats} will fill both caches. From that time forward, there will be no disk access. Which cache is used depends on the test.

The "treacle" test should be done in a way that ensures that the caches have not been filled. Something like:
- Ensure that the {formats} column is not in the startup sort set.
- Start calibre.
- Scroll down.

My guess is that calibre will be noticeably slower scrolling when there is a {formats} column. It must do a stat on each format for the book before it can display the book line. The approximate_formats() function avoids this work.
@chaley - do the caches persist across calibre starts, and do they persist across reboots ?

Yesterday I put { formats } back into my Default View (View Manager), it may have slowed my calibre start from 1-2 secs to 3-4 secs - but IMO thats just almost within the normal margin of variability - and plenty good enough for moi.

And I am still getting smooth scrolling and fast sorts on that column, even after several restarts of calibre, system shutdowns and cold boots etc

It's very odd - it's not just calibre that's working faster, so are my music and image library programs - quodlibet and iMatch. Even firefox feels snappier. This morning my fixed line phone wasn't working, called the telco, couple of hours later there was a man in the street fixing it!

BR
BetterRed is offline   Reply With Quote
Old 03-25-2013, 05:56 AM   #11
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,124
Karma: 5721184
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
Perhaps you've accidentally pressed the turbo button on your computer?
Adoby is offline   Reply With Quote
Old 03-25-2013, 06:24 AM   #12
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,975
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
The only significant recent events I can think of are : the Roman Catholics got a new Pope; Canterbury got itself a new Archbishop; India gave Australia a shellacking with a four zip whitewash in the cricket; and Cypriot banks got caught with shedloads of Russian loot in their vaults.
BetterRed is offline   Reply With Quote
Old 03-25-2013, 07:36 AM   #13
chaley
"chaley", not "charley"
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: 5,907
Karma: 1216548
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by BetterRed View Post
@chaley - do the caches persist across calibre starts, and do they persist across reboots ?
Neither. They are rebuilt on demand during each calibre execution.
chaley is offline   Reply With Quote
Old 03-25-2013, 11:14 AM   #14
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,975
Karma: 2925589
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by chaley View Post
Neither. They are rebuilt on demand during each calibre execution.
Correct, they wouldn't be caches if they persisted

I just uploaded about 2000 images into iMatch - that used to take about 8-10 minutes, took 4m 49secs. Same disks, same memory, same processor, same video card, same mobo, same software!

I give up, guess I'll just have to put up with a faster computer. If I can figure out why this has happened I'll let y'all know .

BR
BetterRed is offline   Reply With Quote
Old 03-25-2013, 01:45 PM   #15
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,259
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Adoby View Post
Perhaps you've accidentally pressed the turbo button on your computer?
You are old as dirt
IIRC my last Mobo that supported the Turbo button, was a 286 board.
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only one of 8 libraries won't let me see formats column Meinhut Calibre 2 06-02-2012 08:25 AM
Q: multi-column PDF to single column mobi format converstion auburn1975 Calibre 7 01-28-2012 07:11 PM
Sorting "Formats" column dancingbacon Library Management 7 11-25-2011 07:30 PM
User Column with number of formats lbik Library Management 6 06-18-2011 08:55 AM
formats column Philosopher Calibre 17 01-20-2011 07:23 PM


All times are GMT -4. The time now is 08:59 AM.


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