On the cache-server branch:  Eliminate 70+% of the cache access overhead
caused by calculating expensive hash sums.

We use two approaches here.  First, cache the combined_key (i.e. hash)
values from the last access and skip the calculation if the same key is
being used again.  This is very effective because we often probe a cache
with a specific key and then set a value for that key.

Secondly, we leverage the fact that most keys in fsfs-format7 code will
be fixed-size 16 byte keys (80+% up from ~50%).  Simply combining those
with the respective cache prefix will already produce a unique key.  We
add some scrambling code to distribute their values somewhat more evenly
over the key space.

* subversion/libsvn_subr/cache-membuffer.c
  (): update / correct global doc
  (get_group_index): compensate for the worsened key value distribution
  (last_access_key_t): new data structure
  (svn_membuffer_cache_t): add cache for the last combine_key() result
  (combine_long_key): split from combine_key(); use cached values
  (combine_key): split; add fast code for short fixed-size keys
  (svn_cache__create_membuffer_cache): update


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/cache-server@1458643 13f79535-47bb-0310-9956-ffa450edef68
1 file changed