]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: http: improve parsing performance of long URIs
authorWilly Tarreau <w@1wt.eu>
Sat, 5 Nov 2016 16:52:06 +0000 (17:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 5 Nov 2016 17:00:35 +0000 (18:00 +0100)
commit5f10ea30f4a2a3fd32eed0844ab999c6068f7fba
tree1439a046b4cd30bafe962f39b9c65fffc33b1794
parent0431f9d476a1237f76e360998bc7605506651b84
OPTIM: http: improve parsing performance of long URIs

Searching the trailing space in long URIs takes some time. This can
happen especially on static files and some blogs. By skipping valid
character ranges by 32-bit blocks, it's possible to increase the
HTTP performance from 212k to 216k req/s on requests features a
100-character URI, which is an increase of 2%. This is done for
architectures supporting unaligned accesses (x86_64, x86, armv7a).
There's only a 32-bit version because URIs are rarely long and very
often short, so it's more efficient to limit the systematic overhead
than to try to optimize for the rarest requests.
src/proto_http.c