httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Eilebrecht <>
Subject [PATCH] PR#3160: improve RewriteMap handling by using a hash tab
Date Sun, 15 Nov 1998 18:22:48 GMT

Information from PR#3160:

   A txt: file is now parsed with simple string functions instead
   of heavy regular expression parsing (thereby fixing a bug that
   prevented the usage of keys containing the ',' character).

   The memory array now also stores failed lookups (as an empty
   string) which is returned as a NULL to the upper layer.

   The memory array lookups are cached in a 4-way hash table
   with LRU functionality. For small rewrite maps this is slower
   though as I use a simple, expensive hash function.

   Using a rewrite map for mass-virtual-hosting is now faster
   by two orders of magnitude on our servers.

The attachement contains the submitter's patch with some minor
changes (apart from cosmetic changes the txt file parsing routine
now also handles DOS-style text files and the value of an entry is
only parsed if the key matched).

I tested the patch with a bunch of different map files and found
no bugs or problems.

Lars Eilebrecht                   - vuja de: The feeling that you've *never*,                     - *ever* been in this situation before.

View raw message