Speed optimization for viewing large EPUB files

This commit is contained in:
Kovid Goyal 2010-02-15 10:38:39 -07:00
parent 8dd35bc55c
commit 1c5b48e2fd

View File

@ -184,7 +184,8 @@ class EbookIterator(object):
if hasattr(self.pathtoopf, 'manifest'):
self.pathtoopf = write_oebbook(self.pathtoopf, self.base)
self.opf = getattr(plumber.input_plugin, 'optimize_opf_parsing', None)
if self.opf is None:
self.opf = OPF(self.pathtoopf, os.path.dirname(self.pathtoopf))
self.language = self.opf.language
if self.language: