author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 29 Apr 2003 21:56:49 +0000 (21:56 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 29 Apr 2003 21:56:49 +0000 (21:56 +0000) | ||
commit | 1ff87c72f0b424c41d10efe18428eea65b88b302 | |
tree | fec9285bd90e8e0c6db32aec12b23262eee48aaa | tree | snapshot |
parent | 94cfff9d3f3009f7bae2494592f461165253132c | commit | diff |
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
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 | diff | blob | history |