On Wed, Aug 7, 2013 at 3:59 PM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
> Could you please provide log message for your patch submission [1]. It
> makes reviewing patch much easier.
>
See below.
> Did you consider make separate cache_pool and clear if we invoked with
> different user?
>
I revised the patch so that svn_authz_t->pool is now a sub pool of the pool
passed
to authz_create() and will be cleared when we encounter a different user.
[[[
Speed up svn_repos_authz_check_access() by caching the results of previous
lookups.
This patch reduces the cumulative time spent in
svn_repos_authz_check_access ()
(when called repeteadly on the same connection) by more than 50%.
* subversion/libsvn_repos/authz.c
(svn_authz_t) Add members CACHE, CACHED_USER, POOL
to hold cached results.
(authz_lookup_baton) Replace member svn_config_t * CONFIG
with svn_authz_t * AUTHZ.
(authz_create) New function, allocates and initializes a svn_authz_t.
(svn_repos__authz_read, svn_repos_authz_parse) Use authz_create()
to create a svn_authz_t.
(authz_get_path_access, authz_get_tree_access, authz_get_any_access)
Expect svn_authz_t * parameter instead of svn_config_t *.
(authz_lookup_cached) New function. This is a wrapper for
svn_config_enumerate2(..., path, authz_parse_line, baton, ...)
that first consults the cache for the result of a previous call for the
same path.
(authz_parse_section, authz_get_path_access,
authz_get_any_access_parser_cb) Replace calls of svn_config_enumerate2()
by authz_lookup_cached().
(svn_repos_authz_check_access) Purge the cache if USER is different
from authz->cached_user. Pass svn_authz_t * instead of svn_config_t *
to authz_get_*_access() functions.
]]]
Cheers, Roderich
Received on 2013-08-07 19:20:32 CEST