You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2012/09/07 10:11:57 UTC
Re: svn commit: r1381800 - /subversion/trunk/subversion/libsvn_subr/io.c
On Fri, Sep 7, 2012 at 3:32 AM, <st...@apache.org> wrote:
> Author: stefan2
> Date: Thu Sep 6 23:32:11 2012
> New Revision: 1381800
>
> URL: http://svn.apache.org/viewvc?rev=1381800&view=rev
> Log:
> Re-implement svn_io_read_length_line as this is one of the
> most-called functions in SVN. Instead of reading data a byte
> at a time, read 128 byte chunks and scan those.
>
Hi Stefan,
Why do not use APR internal buffering? I meant APR_BUFFERED flag.
--
Ivan Zhakov
Re: svn commit: r1381800 - /subversion/trunk/subversion/libsvn_subr/io.c
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Fri, Sep 7, 2012 at 10:11 AM, Ivan Zhakov <iv...@visualsvn.com> wrote:
> On Fri, Sep 7, 2012 at 3:32 AM, <st...@apache.org> wrote:
> > Author: stefan2
> > Date: Thu Sep 6 23:32:11 2012
> > New Revision: 1381800
> >
> > URL: http://svn.apache.org/viewvc?rev=1381800&view=rev
> > Log:
> > Re-implement svn_io_read_length_line as this is one of the
> > most-called functions in SVN. Instead of reading data a byte
> > at a time, read 128 byte chunks and scan those.
> >
> Hi Stefan,
>
> Why do not use APR internal buffering? I meant APR_BUFFERED flag.
>
I Ivan,
The flag is set. But reading a single byte invokes a
total of 6 functions - each doing its own thing.
'SVN log $tsvn/trunk -v' will call svn_io_read_length_line
316,418 times. In turn, it would call svn_io_file_getc
8,623,854 times - consuming >20% of the CPU time.
With my patch, the fraction is now below 2%.
-- Stefan^2.
--
*
Join us this October at Subversion Live
2012<http://www.wandisco.com/svn-live-2012>
for two days of best practice SVN training, networking, live demos,
committer meet and greet, and more! Space is limited, so get signed up
today<http://www.wandisco.com/svn-live-2012>
!
*