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

RE: [PATCH] Improve single byte read stream performance

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 7 Mar 2010 21:30:35 +0100

> -----Original Message-----
> From: Stefan Fuhrman [mailto:stefanfuhrmann_at_alice-dsl.de]
> Sent: zondag 7 maart 2010 20:40
> To: dev_at_subversion.apache.org
> Subject: [PATCH] Improve single byte read stream performance
>
> While profiling TSVN's SVN proper access code,
> I found that about 40% of the runtime was spent in
> svn_config_get_config(). The reason was the config
> parser fetching individual bytes from the input stream.
>
> However, translated_stream_read() obviously imposes
> a significant overhead per call for smaller chunk sizes.
> This patch quadruples the translated_stream_read()
> throughput for single bytes cutting svn_config_get_config()
> runtime by 50%.

        Hi Stefan,

Thanks for your patch. It looks like a simple optimization that can help.

Where are those other slowdowns you see?

If we want to speed up the configuration file parsing we could also optimize
the parser in config_file.c to buffer at the character level. (This seems a
more logical place to me than to optimize all specific stream types for
single byte access).

It might even be easier to rewrite some parts of this config parser using
the line based API we also use for reading diff files.

        Bert

>
> -- Stefan^2.
>
> [[[
> Speed up input stream processing in config parser and
> others that read single bytes from a stream.
>
> * subversion/libsvn_subr/subst.c
> (translated_stream_read): Add an optimized code path
> for single byte read requests.
>
> Patch by: Stefan Fuhrmann <stefanfuhrmann{_AT_}alice-dsl.de>
> ]]]
Received on 2010-03-07 21:31:26 CET

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.