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

Re: svn commit: rev 1912 - trunk/subversion/include trunk/subversion/libsvn_subr trunk/subversion/libsvn_repos

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-05-11 18:48:37 CEST

Greg Hudson <ghudson@MIT.EDU> writes:

> On Thu, 2002-05-09 at 00:23, sussman@tigris.org wrote:
> > + while (1)
> > + {
> > + numbytes = 1;
> > + SVN_ERR (svn_stream_read (stream, &c, &numbytes));
> > +
> > + if ((c == '\n'))
> > + break;
> > +
> > + svn_stringbuf_appendbytes (str, &c, 1);
> > + }
>
> This seems likely to be a real performance killer.
>
> I think you need to create a buffered stream object if you want to
> abstract out line-reading. Or maybe just reevaluate whether you really
> need an svn_stream here, instead of something less generic like an APR
> file.

Well, I'm certain that we want our dumper and loader to operate on
generic svn_stream_t's. We want maximum flexibility.

We certainly *could* write a buffered stream_t, but at the moment, I
don't think we have a real problem. The stream being read by the
loader is usually a stdio FILE * anyway, which means the operating
system is already buffering for us, no?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 11 18:51:39 2002

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