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