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

Re: svn commit: r985695 - /subversion/branches/performance/subversion/libsvn_subr/stream.c

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Tue, 17 Aug 2010 11:48:24 -0500

This looks like it could be a candidate for 1.6.x.

-Hyrum

On Sun, Aug 15, 2010 at 10:47 AM, <stefan2_at_apache.org> wrote:
> Author: stefan2
> Date: Sun Aug 15 15:47:38 2010
> New Revision: 985695
>
> URL: http://svn.apache.org/viewvc?rev=985695&view=rev
> Log:
> Follow-up to r985601: fix a rare error condition that does not hurt functionality
> but performance (massively, so). stream_readline_chunky failed to detect EOL
> for longer lines until the end of the stream was encountered and would eventually
> fall back to byte-wise parsing the data.
>
> * subversion/libsvn_subr/stream.c
>  (stream_readline_chunky): fix EOL detection for long lines
>
> Modified:
>    subversion/branches/performance/subversion/libsvn_subr/stream.c
>
> Modified: subversion/branches/performance/subversion/libsvn_subr/stream.c
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/stream.c?rev=985695&r1=985694&r2=985695&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/libsvn_subr/stream.c (original)
> +++ subversion/branches/performance/subversion/libsvn_subr/stream.c Sun Aug 15 15:47:38 2010
> @@ -433,7 +433,7 @@ stream_readline_chunky(svn_stringbuf_t *
>       {
>         /* Append the next chunk to the string read so far.
>          */
> -        svn_stringbuf_ensure (str, str->len + LINE_CHUNK_SIZE);
> +        svn_stringbuf_ensure(str, str->len + LINE_CHUNK_SIZE);
>         numbytes = LINE_CHUNK_SIZE;
>         SVN_ERR(svn_stream_read(stream, str->data + str->len, &numbytes));
>         str->len += numbytes;
> @@ -456,7 +456,7 @@ stream_readline_chunky(svn_stringbuf_t *
>          * previous chunk because the EOL may span over the boundary
>          * between both chunks.
>          */
> -        eol_pos = strstr(str->data + str->len - (eol_len-1), eol);
> +        eol_pos = strstr(str->data + str->len - numbytes - (eol_len-1), eol);
>       }
>       while (eol_pos == NULL);
>
>
>
>
Received on 2010-08-17 18:49:04 CEST

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.