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

Re: svn commit: r1381800 - /subversion/trunk/subversion/libsvn_subr/io.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Fri, 7 Sep 2012 15:25:33 +0200

On Fri, Sep 7, 2012 at 10:11 AM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:

> On Fri, Sep 7, 2012 at 3:32 AM, <stefan2_at_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>
!
*
Received on 2012-09-07 15:26:07 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.