On Thu, May 31, 2012 at 11:49 AM, Greg Stein <gstein_at_gmail.com> wrote:
> On Thu, May 31, 2012 at 3:41 AM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>> On Wed, May 30, 2012 at 8:52 PM, <rhuijben_at_apache.org> wrote:
>>> Author: rhuijben
>>> Date: Wed May 30 16:52:36 2012
>>> New Revision: 1344347
>>>
>>> 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.
>>>
>>> The nice clean stream translation code had an 7 times overhead on this very
>>> performance critical code path, while clients of svnserve and httpd were
>>> waiting. (Before this patch the this code path used 22% of the cpu time,
>>> now just 3%)
>>
>> Great improvement, but it may be worth to factor out this code to
>> special stream like svn_stream_buffered().
>
> When I saw this change, my first thought was, "wtf? just read the
> whole damned file into memory". (I just haven't had time to look into
> this to provide some actual advice beyond amazement)
>
> Config files are NOT 100 megabytes. Read the damned things into memory
> in one giant piece. I/O is reduced, memory is available. Everybody
> wins.
>
Config files are also used for authz settings and they can be even
more than 100 MB in real world scenarios.
--
Ivan Zhakov
Received on 2012-05-31 09:58:11 CEST