You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/07/28 00:23:26 UTC
svn commit: r1613854 - in /subversion/branches/authzperf: BRANCH-README
subversion/libsvn_repos/authz.c
Author: stefan2
Date: Sun Jul 27 22:23:26 2014
New Revision: 1613854
URL: http://svn.apache.org/r1613854
Log:
On the authzperf branch: Very first step towards faster authz.
Determine the user's aliases and group memberships once and
then use this to evaluate rules in O(1).
Right now, that information is constructed on the fly for each
request and used from the existing matching code. This overhead
will be eliminated in later commits. Right now, this is to
introduce new, reviewable / testable code.
* BRANCH-README
(TODO, DONE): Update.
* subversion/libsvn_repos/authz.c
(set_add_string): New utility function.
(add_alias_baton_t,
add_alias,
get_aliases): New code to find all aliases to a given user.
(add_group_baton_t,
add_group,
get_group_memberships): New code to create a member->group
map for all relevant members.
(get_memberships): New function using all of the above to build
the complete set of "left-side-strings" (names)
in the rule lines that a relevant to a given
user.
(authz_lookup_baton): Instead of the plain user use a hash set as
constructed above to identify what we want.
(authz_alias_is_user,
authz_group_contains_user): Drop the now obsolete dynamic group
and alias resolution code.
(authz_line_applies_to_user): Greatly simplify by doing a simple
hash lookup.
(authz_get_path_access,
authz_get_tree_access,
authz_get_any_access): Update providing the memberships set
instead of the plain user name.
Modified:
subversion/branches/authzperf/BRANCH-README
subversion/branches/authzperf/subversion/libsvn_repos/authz.c
Modified: subversion/branches/authzperf/BRANCH-README
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/BRANCH-README?rev=1613854&r1=1613853&r2=1613854&view=diff
==============================================================================
--- subversion/branches/authzperf/BRANCH-README (original)
+++ subversion/branches/authzperf/BRANCH-README Sun Jul 27 22:23:26 2014
@@ -4,7 +4,6 @@ allows much faster authz resolving and a
TODO:
-* O(1) check that a rule applies to a given user
* construct a prefix tree from the path rules
* pre-calculate rule sets for the given user
* implement recursive tree checks
@@ -18,3 +17,4 @@ TODO:
DONE:
+* O(1) check that a rule applies to a given user
Modified: subversion/branches/authzperf/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/libsvn_repos/authz.c?rev=1613854&r1=1613853&r2=1613854&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/authzperf/subversion/libsvn_repos/authz.c Sun Jul 27 22:23:26 2014
@@ -36,9 +36,229 @@
#include "svn_ctype.h"
#include "private/svn_fspath.h"
#include "private/svn_repos_private.h"
+#include "private/svn_subr_private.h"
#include "repos.h"
+/*** Utilities. ***/
+
+/* We are using hashes to represent sets. This glorified macro adds the
+ * string KEY to SET. */
+static void
+set_add_string(apr_hash_t *set,
+ const char *key)
+{
+ apr_hash_set(set, key, strlen(key), "");
+}
+
+
+/*** Users, aliases and groups. ***/
+
+/* Callback baton used with add_alias(). */
+typedef struct add_alias_baton_t
+{
+ /* Store the alias names here (including the '&' prefix). */
+ apr_hash_t *aliases;
+
+ /* The user we are lookup up. */
+ const char *user;
+} add_alias_baton_t;
+
+/* Implements svn_config_enumerator2_t processing all entries in the
+ * [aliases] section. Collect all the aliases for the user specified
+ * in VOID_BATON. */
+static svn_boolean_t
+add_alias(const char *name,
+ const char *value,
+ void *void_baton,
+ apr_pool_t *scrath_pool)
+{
+ add_alias_baton_t *baton = void_baton;
+
+ /* Is this an alias for the current user? */
+ if (strcmp(baton->user, value) == 0)
+ {
+ /* Add it to our results. However, decorate it such that it will
+ match directly against all occurrences of that alias. */
+ apr_pool_t *result_pool = apr_hash_pool_get(baton->aliases);
+ const char *decorated_name = apr_pstrcat(result_pool, "&", name,
+ SVN_VA_NULL);
+ set_add_string(baton->aliases, decorated_name);
+ }
+
+ /* Keep going. */
+ return TRUE;
+}
+
+/* Wrapper around svn_config_enumerate2. Return a hash set containing the
+ * USER and all its aliases as defined in CONFIG. */
+static apr_hash_t *
+get_aliases(svn_config_t *config,
+ const char *user,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_t *result = svn_hash__make(result_pool);
+
+ add_alias_baton_t baton;
+ baton.aliases = result;
+ baton.user = user;
+
+ set_add_string(result, user);
+ svn_config_enumerate2(config, "aliases", add_alias, &baton, scratch_pool);
+
+ return result;
+}
+
+/* Callback baton to be used with add_group(). */
+typedef struct add_group_baton_t
+{
+ /* Output: Maps C string name (user, decorated alias, decorated group) to
+ * an array of C string decorated group names that the key name is
+ * a direct member of. I.e. reversal of the group declaration. */
+ apr_hash_t *memberships;
+
+ /* Name and aliases of the current user. */
+ apr_hash_t *aliases;
+} add_group_baton_t;
+
+/* Implements svn_config_enumerator2_t processing all entries in the
+ * [groups] section. Collect all groups that contain other groups or
+ * directly one of the aliases provided in VOID_BATON. */
+static svn_boolean_t
+add_group(const char *name,
+ const char *value,
+ void *void_baton,
+ apr_pool_t *scrath_pool)
+{
+ int i;
+ apr_array_header_t *list;
+ add_group_baton_t *baton = void_baton;
+ apr_pool_t *result_pool = apr_hash_pool_get(baton->memberships);
+
+ /* Decorated group NAME (i.e. '@' added). Lazily initialized since many
+ * groups may not be relevant. */
+ const char *decorated_name = NULL;
+
+ /* Store the reversed membership All group members. */
+ list = svn_cstring_split(value, ",", TRUE, scrath_pool);
+ for (i = 0; i < list->nelts; i++)
+ {
+ /* We are only interested in other groups as well as the user(s) given
+ through all their aliases. */
+ const char *member = APR_ARRAY_IDX(list, i, const char *);
+ if (member[0] == '@' || svn_hash_gets(baton->aliases, member))
+ {
+ /* Ensure there is a map entry for MEMBER. */
+ apr_array_header_t *groups = svn_hash_gets(baton->memberships,
+ member);
+ if (groups == NULL)
+ {
+ groups = apr_array_make(result_pool, 4, sizeof(const char *));
+ member = apr_pstrdup(result_pool, member);
+ svn_hash_sets(baton->memberships, member, groups);
+ }
+
+ /* Lazily initialize DECORATED_NAME. */
+ if (decorated_name == NULL)
+ decorated_name = apr_pstrcat(result_pool, "@", name, SVN_VA_NULL);
+
+ /* Finally, add the group to the list of memberships. */
+ APR_ARRAY_PUSH(groups, const char *) = decorated_name;
+ }
+ }
+
+ /* Keep going. */
+ return TRUE;
+}
+
+/* Wrapper around svn_config_enumerate2. Find all groups that ALIASES are
+ * members of and all groups that other groups are member of. */
+static apr_hash_t *
+get_group_memberships(svn_config_t *config,
+ apr_hash_t *aliases,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_t *result = svn_hash__make(result_pool);
+
+ add_group_baton_t baton;
+ baton.aliases = aliases;
+ baton.memberships = result;
+ svn_config_enumerate2(config, SVN_CONFIG_SECTION_GROUPS, add_group,
+ &baton, scratch_pool);
+
+ return result;
+}
+
+/* Return a hash set of all name keys (plain user name, decorated aliases
+ * and decorated group names) that refer to USER in the authz CONFIG.
+ * This include indirect group memberships. */
+static apr_hash_t *
+get_memberships(svn_config_t *config,
+ const char *user,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ apr_array_header_t *to_follow;
+ apr_hash_index_t *hi;
+ apr_hash_t *result, *memberships;
+ int i, k;
+
+ /* special case: anonymous user */
+ if (user == NULL)
+ {
+ result = svn_hash__make(result_pool);
+ set_add_string(result, "*");
+ set_add_string(result, "$anonymous");
+
+ return result;
+ }
+
+ /* The USER and all its aliases. */
+ result = get_aliases(config, user, result_pool, scratch_pool);
+
+ /* For each potentially relevant decorated user / group / alias name,
+ * find the immediate group memberships. */
+ memberships = get_group_memberships(config, result, scratch_pool,
+ scratch_pool);
+
+ /* Now, flatten everything and construct the full result.
+ * We start at the user / decorated alias names. */
+ to_follow = apr_array_make(scratch_pool, 16, sizeof(const char *));
+ for (hi = apr_hash_first(scratch_pool, result); hi; hi = apr_hash_next(hi))
+ APR_ARRAY_PUSH(to_follow, const char *) = svn__apr_hash_index_key(hi);
+
+ /* Iteratively add group memberships. */
+ for (i = 0; i < to_follow->nelts; ++i)
+ {
+ /* Is NAME member of any groups? */
+ const char *name = APR_ARRAY_IDX(to_follow, i, const char *);
+ apr_array_header_t *next = svn_hash_gets(memberships, name);
+ if (next)
+ {
+ /* Add all groups to the result, if not included already
+ * (multiple subgroups may belong to the same super group). */
+ for (k = 0; k < next->nelts; ++k)
+ {
+ const char *group = APR_ARRAY_IDX(next, k, const char *);
+ if (!svn_hash_gets(result, group))
+ {
+ /* New group. Add to result and look for parents later. */
+ set_add_string(result, group);
+ APR_ARRAY_PUSH(to_follow, const char *) = group;
+ }
+ }
+ }
+ }
+
+ /* standard memberships */
+ set_add_string(result, "*");
+ set_add_string(result, "$authenticated");
+
+ return result;
+}
+
/*** Structures. ***/
/* Information for the config enumerators called during authz
@@ -47,8 +267,9 @@ struct authz_lookup_baton {
/* The authz configuration. */
svn_config_t *config;
- /* The user to authorize. */
- const char *user;
+ /* The user name, their aliases and names of all groups that the user is
+ a member of. */
+ apr_hash_t *memberships;
/* Explicitly granted rights. */
svn_repos_authz_access_t allow;
@@ -123,74 +344,6 @@ authz_access_is_determined(svn_repos_aut
return FALSE;
}
-/* Return TRUE is USER equals ALIAS. The alias definitions are in the
- "aliases" sections of CFG. Use POOL for temporary allocations during
- the lookup. */
-static svn_boolean_t
-authz_alias_is_user(svn_config_t *cfg,
- const char *alias,
- const char *user,
- apr_pool_t *pool)
-{
- const char *value;
-
- svn_config_get(cfg, &value, "aliases", alias, NULL);
- if (!value)
- return FALSE;
-
- if (strcmp(value, user) == 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-/* Return TRUE if USER is in GROUP. The group definitions are in the
- "groups" section of CFG. Use POOL for temporary allocations during
- the lookup. */
-static svn_boolean_t
-authz_group_contains_user(svn_config_t *cfg,
- const char *group,
- const char *user,
- apr_pool_t *pool)
-{
- const char *value;
- apr_array_header_t *list;
- int i;
-
- svn_config_get(cfg, &value, "groups", group, NULL);
-
- list = svn_cstring_split(value, ",", TRUE, pool);
-
- for (i = 0; i < list->nelts; i++)
- {
- const char *group_user = APR_ARRAY_IDX(list, i, char *);
-
- /* If the 'user' is a subgroup, recurse into it. */
- if (*group_user == '@')
- {
- if (authz_group_contains_user(cfg, &group_user[1],
- user, pool))
- return TRUE;
- }
-
- /* If the 'user' is an alias, verify it. */
- else if (*group_user == '&')
- {
- if (authz_alias_is_user(cfg, &group_user[1],
- user, pool))
- return TRUE;
- }
-
- /* If the user matches, stop. */
- else if (strcmp(user, group_user) == 0)
- return TRUE;
- }
-
- return FALSE;
-}
-
-
/* Determines whether an authz rule applies to the current
* user, given the name part of the rule's name-value pair
* in RULE_MATCH_STRING and the authz_lookup_baton object
@@ -201,48 +354,12 @@ authz_line_applies_to_user(const char *r
struct authz_lookup_baton *b,
apr_pool_t *pool)
{
- /* If the rule has an inversion, recurse and invert the result. */
if (rule_match_string[0] == '~')
- return !authz_line_applies_to_user(&rule_match_string[1], b, pool);
-
- /* Check for special tokens. */
- if (strcmp(rule_match_string, "$anonymous") == 0)
- return (b->user == NULL);
- if (strcmp(rule_match_string, "$authenticated") == 0)
- return (b->user != NULL);
+ return svn_hash_gets(b->memberships, rule_match_string + 1) == NULL;
- /* Check for a wildcard rule. */
- if (strcmp(rule_match_string, "*") == 0)
- return TRUE;
-
- /* If we get here, then the rule is:
- * - Not an inversion rule.
- * - Not an authz token rule.
- * - Not a wildcard rule.
- *
- * All that's left over is regular user or group specifications.
- */
-
- /* If the session is anonymous, then a user/group
- * rule definitely won't match.
- */
- if (b->user == NULL)
- return FALSE;
-
- /* Process the rule depending on whether it is
- * a user, alias or group rule.
- */
- if (rule_match_string[0] == '@')
- return authz_group_contains_user(
- b->config, &rule_match_string[1], b->user, pool);
- else if (rule_match_string[0] == '&')
- return authz_alias_is_user(
- b->config, &rule_match_string[1], b->user, pool);
- else
- return (strcmp(b->user, rule_match_string) == 0);
+ return svn_hash_gets(b->memberships, rule_match_string) != NULL;
}
-
/* Callback to parse one line of an authz file and update the
* authz_baton accordingly.
*/
@@ -341,7 +458,7 @@ authz_get_path_access(svn_config_t *cfg,
struct authz_lookup_baton baton = { 0 };
baton.config = cfg;
- baton.user = user;
+ baton.memberships = get_memberships(cfg, user, pool, pool);
/* Try to locate a repository-specific block first. */
qualified_path = apr_pstrcat(pool, repos_name, ":", path, SVN_VA_NULL);
@@ -383,7 +500,7 @@ authz_get_tree_access(svn_config_t *cfg,
struct authz_lookup_baton baton = { 0 };
baton.config = cfg;
- baton.user = user;
+ baton.memberships = get_memberships(cfg, user, pool, pool);
baton.required_access = required_access;
baton.repos_path = path;
baton.qualified_repos_path = apr_pstrcat(pool, repos_name,
@@ -441,7 +558,7 @@ authz_get_any_access(svn_config_t *cfg,
struct authz_lookup_baton baton = { 0 };
baton.config = cfg;
- baton.user = user;
+ baton.memberships = get_memberships(cfg, user, pool, pool);
baton.required_access = required_access;
baton.access = FALSE; /* Deny access by default. */
baton.repos_path = "/";
Re: svn commit: r1613854 - in /subversion/branches/authzperf:
BRANCH-README subversion/libsvn_repos/authz.c
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Mon, Jul 28, 2014 at 1:48 AM, Branko Čibej <br...@wandisco.com> wrote:
> On 28.07.2014 00:23, stefan2@apache.org wrote:
>
> Author: stefan2
> Date: Sun Jul 27 22:23:26 2014
> New Revision: 1613854
>
> URL: http://svn.apache.org/r1613854
> Log:
> On the authzperf branch: Very first step towards faster authz.
> Determine the user's aliases and group memberships once and
> then use this to evaluate rules in O(1).
>
> Right now, that information is constructed on the fly for each
> request and used from the existing matching code. This overhead
> will be eliminated in later commits. Right now, this is to
> introduce new, reviewable / testable code.
>
>
> [...]
>
> +/*** Utilities. ***/
> +
> +/* We are using hashes to represent sets. This glorified macro adds the
> + * string KEY to SET. */
> +static void
> +set_add_string(apr_hash_t *set,
> + const char *key)
> +{
> + apr_hash_set(set, key, strlen(key), "");
> +}
>
>
> svn_hash_sets. APR's default hash function avoids the strlen overhead
> completely; our hash function already does the strlen.
>
> +/*** Users, aliases and groups. ***/
> +
> +/* Callback baton used with add_alias(). */
> +typedef struct add_alias_baton_t
> +{
> + /* Store the alias names here (including the '&' prefix). */
> + apr_hash_t *aliases;
> +
> + /* The user we are lookup up. */
>
>
> Maybe change this to: "The user we lookup are up to look up"? :)
Writing commentary is always the hardest part ... ;)
Fixed in r1613867.
> +/* Return a hash set of all name keys (plain user name, decorated aliases
> + * and decorated group names) that refer to USER in the authz CONFIG.
> + * This include indirect group memberships. */
>
>
> I'm confused (mostly by the lack of documentation of the structure of the
> in-memory representation of the parsed authz file). Is your intention to
> statically generate, at parsing time, a correlation between each possible
> user name and the set of access control entries that are valid for that
> user? I can easily imagine such a thing exploding in size very quickly, even
> though most ACEs are not likely to ever be used during the lifetime of the
> parsed authz representation.
Right now (old code), for every path, we walk up the tree until we find
a relevant authz entry. Other requests scan all rules in the authz file.
For every path rule, all rules (individual lines in the authz sections),
we check whether it mentions the current user directly or indirectly.
My patch determines all group memberships and aliases in O(size of
groups and alias sections). The final code will do this only twice per
connection (anonymous user and actual user). The lookup is trivial
and also covers special groups like "*" and "$authenticated".
> That last is true for paths in the authz file, too; but memory required for
> them is proportional to the number of paths in the authz file, whereas for
> the user->ACE correlation, it's proportional to the nuber of paths (ACEs)
> times the number of users.
The old code reads the authz file once per connection. The rationale
behind the new code is that we may as well to go over the resulting
svn_config_t once more and create a filtered tree structure plus
preprocessed user data. A single call to authz_get_any_access or
authz_get_tree_access can fully amortize the initial overhead.
> (Of course, if I were writing this, I'd concentrate on the path lookup tree
> first, and tackle users later ...).
The whole thing is already implemented and initial performance numbers are
gigantic (7.5M path checks /s against multiple path rules of the
"/**/*foo*" kind).
Users were simply the most easy part to start at, minimizing the amount of
transient code.
-- Stefan^2.
Re: svn commit: r1613854 - in /subversion/branches/authzperf: BRANCH-README
subversion/libsvn_repos/authz.c
Posted by Branko Čibej <br...@wandisco.com>.
On 28.07.2014 00:23, stefan2@apache.org wrote:
> Author: stefan2
> Date: Sun Jul 27 22:23:26 2014
> New Revision: 1613854
>
> URL: http://svn.apache.org/r1613854
> Log:
> On the authzperf branch: Very first step towards faster authz.
> Determine the user's aliases and group memberships once and
> then use this to evaluate rules in O(1).
>
> Right now, that information is constructed on the fly for each
> request and used from the existing matching code. This overhead
> will be eliminated in later commits. Right now, this is to
> introduce new, reviewable / testable code.
[...]
> +/*** Utilities. ***/
> +
> +/* We are using hashes to represent sets. This glorified macro adds the
> + * string KEY to SET. */
> +static void
> +set_add_string(apr_hash_t *set,
> + const char *key)
> +{
> + apr_hash_set(set, key, strlen(key), "");
> +}
svn_hash_sets. APR's default hash function avoids the strlen overhead
completely; our hash function already does the strlen.
> +/*** Users, aliases and groups. ***/
> +
> +/* Callback baton used with add_alias(). */
> +typedef struct add_alias_baton_t
> +{
> + /* Store the alias names here (including the '&' prefix). */
> + apr_hash_t *aliases;
> +
> + /* The user we are lookup up. */
Maybe change this to: "The user we lookup are up to look up"? :)
> +/* Return a hash set of all name keys (plain user name, decorated aliases
> + * and decorated group names) that refer to USER in the authz CONFIG.
> + * This include indirect group memberships. */
I'm confused (mostly by the lack of documentation of the structure of
the in-memory representation of the parsed authz file). Is your
intention to statically generate, at parsing time, a correlation between
each possible user name and the set of access control entries that are
valid for that user? I can easily imagine such a thing exploding in size
very quickly, even though most ACEs are not likely to ever be used
during the lifetime of the parsed authz representation.
That last is true for paths in the authz file, too; but memory required
for them is proportional to the number of paths in the authz file,
whereas for the user->ACE correlation, it's proportional to the nuber of
paths (ACEs) times the number of users.
(Of course, if I were writing this, I'd concentrate on the path lookup
tree first, and tackle users later ...).
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco | Realising the impossibilities of Big Data
e. brane@wandisco.com
Re: svn commit: r1613854 - in /subversion/branches/authzperf: BRANCH-README
subversion/libsvn_repos/authz.c
Posted by Branko Čibej <br...@wandisco.com>.
On 28.07.2014 12:58, Ivan Zhakov wrote:
> On 28 July 2014 14:52, Branko Čibej <br...@wandisco.com> wrote:
>> On 28.07.2014 12:40, Ivan Zhakov wrote:
>>
>>
>>
>> Anyone who want to improve authz performance should consider to
>> separate config file parser and config storage. To read authz
>> configuration in appropriate custom structure directly and avoid read
>> authz file in intermediate svn_config_t.
>>
>>
>> That's on my todo list, as the very last step. The parsing overhead is the
>> least of our worries right now.
>>
> Great! I just wanted to share my ideas on this topic. As far I
> remember parsing overhead may be significant for big authz files.
I don't doubt that. My point is just that there are likely to be far
more expensive lookups than expensive parsings; and parsing is trivial
compared to optimizing lookups, so getting the hard part done first is
just common sense.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco | Realising the impossibilities of Big Data
e. brane@wandisco.com
Re: svn commit: r1613854 - in /subversion/branches/authzperf:
BRANCH-README subversion/libsvn_repos/authz.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 28 July 2014 14:52, Branko Čibej <br...@wandisco.com> wrote:
> On 28.07.2014 12:40, Ivan Zhakov wrote:
>
> On 28 July 2014 02:23, <st...@apache.org> wrote:
>
> Author: stefan2
> Date: Sun Jul 27 22:23:26 2014
> New Revision: 1613854
>
> URL: http://svn.apache.org/r1613854
> Log:
> On the authzperf branch: Very first step towards faster authz.
> Determine the user's aliases and group memberships once and
> then use this to evaluate rules in O(1).
>
> Right now, that information is constructed on the fly for each
> request and used from the existing matching code. This overhead
> will be eliminated in later commits. Right now, this is to
> introduce new, reviewable / testable code.
>
> Anyone who want to improve authz performance should consider to
> separate config file parser and config storage. To read authz
> configuration in appropriate custom structure directly and avoid read
> authz file in intermediate svn_config_t.
>
>
> That's on my todo list, as the very last step. The parsing overhead is the
> least of our worries right now.
>
Great! I just wanted to share my ideas on this topic. As far I
remember parsing overhead may be significant for big authz files.
--
Ivan Zhakov
Re: svn commit: r1613854 - in /subversion/branches/authzperf: BRANCH-README
subversion/libsvn_repos/authz.c
Posted by Branko Čibej <br...@wandisco.com>.
On 28.07.2014 12:40, Ivan Zhakov wrote:
> On 28 July 2014 02:23, <st...@apache.org> wrote:
>> Author: stefan2
>> Date: Sun Jul 27 22:23:26 2014
>> New Revision: 1613854
>>
>> URL: http://svn.apache.org/r1613854
>> Log:
>> On the authzperf branch: Very first step towards faster authz.
>> Determine the user's aliases and group memberships once and
>> then use this to evaluate rules in O(1).
>>
>> Right now, that information is constructed on the fly for each
>> request and used from the existing matching code. This overhead
>> will be eliminated in later commits. Right now, this is to
>> introduce new, reviewable / testable code.
>>
> Anyone who want to improve authz performance should consider to
> separate config file parser and config storage. To read authz
> configuration in appropriate custom structure directly and avoid read
> authz file in intermediate svn_config_t.
That's on my todo list, as the very last step. The parsing overhead is
the least of our worries right now.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco | Realising the impossibilities of Big Data
e. brane@wandisco.com
Re: svn commit: r1613854 - in /subversion/branches/authzperf:
BRANCH-README subversion/libsvn_repos/authz.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 28 July 2014 02:23, <st...@apache.org> wrote:
> Author: stefan2
> Date: Sun Jul 27 22:23:26 2014
> New Revision: 1613854
>
> URL: http://svn.apache.org/r1613854
> Log:
> On the authzperf branch: Very first step towards faster authz.
> Determine the user's aliases and group memberships once and
> then use this to evaluate rules in O(1).
>
> Right now, that information is constructed on the fly for each
> request and used from the existing matching code. This overhead
> will be eliminated in later commits. Right now, this is to
> introduce new, reviewable / testable code.
>
Anyone who want to improve authz performance should consider to
separate config file parser and config storage. To read authz
configuration in appropriate custom structure directly and avoid read
authz file in intermediate svn_config_t.
--
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com