[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/client main.c

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2001-02-05 07:35:25 CET

Greg Stein committed:
> + /* ### this function must be fixed to do an apr_stat() for SIZE,
> + ### alloc the buffer, then read the file into the buffer. Using
> + ### an svn_string_t means quadratic memory usage: start with
> + ### BUFSIZE, allocate 2*BUFSIZE, then alloc 4*BUFSIZE, etc. */

This doesn't yield quadratic memory usage; in the limit, this yields
memory usage of double the size of the file. (Try counting from the
last allocation back to the first.)

We can still do better, of course; a factor of two is a big deal for a
potentially unbounded file. (Not that I've checked what this file is
or how likely it is to get large.)
Received on Sat Oct 21 14:36:21 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.