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 | 59ffebeb1600f4bd7b0ff79fb2bc08941d3a0195 | |
tree | c0a40bda1d98c73c6e24cd5c32431e4f05945488 | tree | snapshot |
parent | a4503be8f7d6d69d9e7a834df266856726346430 | 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/program@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/program@205 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_open.c | diff | blob | history |