View Single Post
Old 04-23-2012, 12:45 PM   #1
Jesse Chisholm
Enthusiast
Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.Jesse Chisholm actually enjoys Vogon poetry.
 
Jesse Chisholm's Avatar
 
Posts: 27
Karma: 56200
Join Date: Jul 2011
Location: California
Device: none
Anomaly in calibre.ebooks.metadata.book ?

I was perusing code to improve my understanding before I launched my next effort in writing a plugin.

I saw an anomaly (not a bug) in calibre.ebooks.metadata.book in base.py circa lines 653..656 in the method format_field_extended.

Lines 653..654 appear to be redundant to lines 657..658.
Line 655 appears to be redundant to line 659.
Line 656 appears to be redundant to line 651.

If my analysis is right, then removing 653..656 will save nano-seconds per month by avoiding the duplicate call to fetch cmeta.

-Jesse
Jesse Chisholm is offline   Reply With Quote