Code

readline in rrd_open.c reads the file in 8 KB blocks, and calls realloc for
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 29 Apr 2003 21:56:49 +0000 (21:56 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 29 Apr 2003 21:56:49 +0000 (21:56 +0000)
commit1ff87c72f0b424c41d10efe18428eea65b88b302
treefec9285bd90e8e0c6db32aec12b23262eee48aaa
parent94cfff9d3f3009f7bae2494592f461165253132c
readline in rrd_open.c reads the file in 8 KB blocks, and calls realloc for
each block. realloc is very slow in Mac OS X for huge blocks, e.g. when
restoring databases from huge xml files. This patch finds the size of the
file, and starts out with malloc'ing the full size.
-- Peter Speck <speck@ruc.dk>

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@205 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_open.c