Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structwriter memory leak (originally reported by Chimezie) #17

Open
uogbuji opened this issue Jul 8, 2013 · 0 comments
Open

structwriter memory leak (originally reported by Chimezie) #17

uogbuji opened this issue Jul 8, 2013 · 0 comments
Assignees

Comments

@uogbuji
Copy link
Contributor

uogbuji commented Jul 8, 2013

See: http://groups.google.com/group/akara/browse_thread/thread/61c3dfdee4e9301b

An example template that causes the problem (with a sequence of very large files) is below. It uses pushtree to stream elements to structwriter

def main(..etc..):
..snip..
w = structwriter(indent=u"yes",stream=someStream)
feed = w.cofeed(
ROOT(
E_CURSOR(
(RDF.RDFNS, u'rdf:RDF'))))
handler = Handle(feed,..etc..)
@coroutine
def receive_nodes(..etc..):
while True:
node = yield
handler.handle(node..,..etc..)
return
target = receive_nodes(..etc..)
pushtree(doc, u'MedlineCitation', target.send,
entity_factory=entity_base)
handler.feed.close()
target.close()
return someStream.getvalue()

@ghost ghost assigned uogbuji Jul 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant