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

Re: r1344347 - stream buffering in config_file.c

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Fri, 4 Apr 2014 11:32:07 +0400

On 3 April 2014 22:15, Julian Foad <julianfoad_at_btopenworld.com> wrote:
>>> URL: http://svn.apache.org/viewvc?rev=1344347&view=rev
>>> Log:
>>> Remove about 15% of the cpu overhead of svnserve and httpd while running
>>> the test suite by introducing a very simple parser buffer in the config file
>>> parser code.
> [...]
>>> * subversion/libsvn_subr/config_file.c
>>> (parse_context_t): Add buffer and position variables. Use EOF as no
>>> ungetc var.
> [...]
>>> Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
>>> ==============================================================================
>>> +
>>> + /* Parser buffer for getc() to avoid call overhead into several libraries
>>> + for every character */
>>> + char parser_buffer[SVN_STREAM_CHUNK_SIZE];
> [...]
> This commit implements buffering of a generic stream, directly in the config file parser. Would it
> not be better to implement buffering of a generic stream as a generic module?
This commit improved performance over buffer APR file, so switching to
back to buffered stream will degrade performance again.
Config parser also use parser_buffer knowledge to use extremle
optimized memchr() to find end of line to skip comment lines. Config
parsers used very often, that's because it should be optimized.

Ivan Zhakov
Received on 2014-04-04 09:33:02 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.