[rrd-developers] rrd_restore rewritten with libxml2 xmlTextReader interface
Tobias Oetiker
tobi at oetiker.ch
Tue May 26 00:27:21 CEST 2009
rrd_restore used between 30 and 40 times as much memory as the size
of the rrd file to be restored. This is due to the use of libxml2
for parsing the the whole file prior to turning it into rrd
structs.
r1811 modifies rrd_restore to using the libxml2s xmlTextReader
incremental parsing interface. This reduces the memory requirements
to about twice the size of the rrd file which should be quite
manageable for most cases.
The parsing is about 25% less efficient than with the previous
version of rrd_restore. This could be in part due to the more
liberal use of malloced memory. Optimizing this is for another day
though.
--tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list