For the match of balancer://group/ I don't believe length adds any value.
The one and hopefully final strcmp to validate the hash elt election should
accomplish this. From that point it becomes simple sting concatenation.
The optimization is getting us to that elt.
On Feb 13, 2018 11:32 AM, "Yann Ylavic" <ylavic....@gmail.com> wrote:
> On Tue, Feb 13, 2018 at 3:19 PM, Graham Leggett <minf...@sharp.fm> wrote:
> > Another option for the name is to store a URL prefix length and a hash of
> > the prefix. If the hash of the prefix matches, we have a match. Would
> > work, would it be too expensive to hash on every hit, would it be safe
> > enough?
> It could work for prefix equality (with a keyed hash function like
> siphash to avoid collision forgery), though hashing every URL
> (possibly multiple times, for each different configured length) might
> be more costly than the current strncmp.
> But I suppose that the main issue is for regex matchings ("ProxyPass
> ~" and ProxyPassMatch)...