/[Apache-SVN]
ViewVC logotype

Revision 1908751


Jump to revision: Previous Next
Author: philip
Date: Mon Mar 27 18:41:36 2023 UTC (13 months, 1 week ago)
Changed paths: 3
Log Message:
There are some places where we use svn_revnum_t as keys in an apr_hash_t
and it turns out that APR's default hash function doesn't work very well
in this case. For the load revmap hash it is possible for over 96% of the
revnums added to the hash to be in hash collision chains, meaning that
most hash lookups will degrade to a linked list scan.  Subversion has an
alternative hash function, available via svn_hash__make(), that works
much better in this case, so use it.

* subversion/libsvn_repos/load-fs-vtable.c
  (struct parse_baton): Add comment.
  (svn_repos_get_fs_build_parser6): Use svn_hash__make.

* subversion/libsvn_repos/reporter.c
  (struct report_baton_t): Add comment.
  (svn_repos_begin_report3): Use svn_hash__make.

* tools/dev/hash-test.c: New.


Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_repos/load-fs-vtable.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_repos/reporter.c modified , text changed
Directorysubversion/trunk/tools/dev/hash-test.c added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26