maizy/PonyLib — Issue #14: Memory leaks
Author: maizy
Created: 2011-11-29 06:49:44+00:00
State: open
Labels: Bug, FB2 Scanner

Should work for very big libs (200.000 - 300.000 books), but fails after about 20.000.

Add some memory watches.

Error:

Meta info: None
------------------------------------------------------------
Traceback (most recent call last):
File "/home/acer/Development/ponylib_production/ponylib/../ponylib/management/commands/pl_scan.py", line 61, in handle
mi = meta.read_fb2_meta(full_path)
File "/home/acer/Development/ponylib_production/ponylib/../ponylib/meta.py", line 49, in read_fb2_meta
mi = fb2_meta.get_metadata(stream)
File "/home/acer/Development/ponylib_production/libs/calibre_based/fb2_meta.py", line 116, in get_metadata
root = _get_fbroot(stream)
File "/home/acer/Development/ponylib_production/libs/calibre_based/fb2_meta.py", line 340, in _get_fbroot
raw = xml_to_unicode(raw, strip_encoding_pats=True)[0]
File "/home/acer/Development/ponylib_production/libs/calibre_based/fb2_meta.py", line 99, in xml_to_unicode
raw = strip_encoding_declarations(raw)
File "/home/acer/Development/ponylib_production/libs/calibre_based/fb2_meta.py", line 53, in strip_encoding_declarations
suffix = raw[limit:]
MemoryError