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

Re: Opening the repository hooks environment file

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 28 Mar 2013 22:05:52 +0100

On 28.03.2013 21:50, Bert Huijben wrote:
>
>> -----Original Message-----
>> From: MARTIN PHILIP [mailto:codematters_at_ntlworld.com] On Behalf Of
>> Philip Martin
>> Sent: donderdag 28 maart 2013 19:32
>> To: Bert Huijben
>> Cc: dev_at_subversion.apache.org
>> Subject: Opening the repository hooks environment file
>>
>> "Bert Huijben" <bert_at_qqmail.nl> writes:
>>
>>> The reading of one file for each access to the repository is a more
>>> than measurable slowdown when profiling operations. (Reading fsfs.conf
>>> over and over again is one of the most expensive things apache worker
>>> processes do when I profiled them. I think stefan2 optimized some of
>>> this away)
>> We have already picked up one new file on every access in 1.8: the hooks
>> environment file. This appears to be opened and parsed for every time
>> mod_dav_svn opens the repository, both read and write operations.
>>
>> Perhaps we should require an explict config setting to enable the hooks
>> file so that we can avoid opening it when it is empty? Or perhaps we
>> could make the opening/parsing lazy and delay it until running a hook
>> thus avoiding it for read operations?
> Would be nice if we can read it on first use (after the hook exists check?)
> and then cache it.
>
> I'm not sure why this didn't turn op in the performance traces though. Maybe
> because this file doesn't exist by default?

Sure it does, "svnadmin create" will create a template. I think you're
overestimating the cost of reading such small files; it'll mostly stay
in RAM once it's been read, and parsing it is not all that expensive.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2013-03-28 22:06:27 CET

This is an archived mail posted to the Subversion Dev mailing list.