Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problem with libxml and Reader#expand not freeing memory

Thread Tools

Problem with libxml and Reader#expand not freeing memory

Posts: n/a

I've already posted it to libxml-ruby tracker page, but I guess this
list is read by more people

I'm trying to use libxml-ruby to parse ~250MB XML files. The files
contain list of similar elements, so I'm iterating
over each element and expand it with reader.expand: # go to the first node
node = reader.expand
end while != 0

The problem is that the memory allocated by objects created using
reader.expand is not freed till the reader is closed, which is
actually equivalent to parsing the whole file in memory, which
contradicts the whole idea of using pull parser.

Anyone had similar issue?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is this code not freeing memory ? jithoosin C++ 0 07-21-2006 09:09 AM
tkinter: not freeing memory like I'd expect Benjamin Rutt Python 0 03-30-2006 07:56 PM
memory allocation and freeing memory Rodrigo Dominguez C Programming 11 06-14-2005 11:54 PM
C++ libraries: Xerces, libxml/libxml++ or perhaps Arabica? Olav XML 3 01-20-2005 02:51 PM
Problems with libxml, XML::LibXML and Perl Ian Gregory XML 1 07-25-2003 04:20 PM