Roderich Schupp <roderich.schupp_at_gmail.com> writes:
> On Friday, August 9, 2013, Philip Martin wrote:
>> We could cache the results of authz_parse_line. That would limit the
>> cache size as it would only grow to the number of sections in the file.
>> Also authz_parse_line is often the expensive bit as it involves checking
>> the user against all the rules while handling groups and aliases.
> That's exactly how my patch works.
The patch I looked at cached the result of calling svn_config_enumerate2
for a user/path pair. I'm suggesting something different: caching
user/block inside authz_parse_line.
To see the difference consider an authz file with just one block for /.
Given two paths, /foo/bar and /zig/zag, your patch produces two cache
entries. Repeat requests for one of the paths pull the result directly
from the cache. The cache grows without limit as further distinct paths
I'm suggesting a cache that works inside authz_parse_line and stores the
result for the authz block, / in this example. A repeat request for
/foo/bar will still do the hash lookups for /foo/bar, /foo and / but
when it gets to / it will then pull the result from the cache. The
cache is less efficient, we still the the hash lookups, but the cache
size is limited by the size of the authz file.
Philip Martin | Subversion Committer
WANdisco | Non-Stop Data
Received on 2013-08-11 23:18:07 CEST