/[Apache-SVN]
ViewVC logotype

Revision 1590405


Jump to revision: Previous Next
Author: stefan2
Date: Sun Apr 27 15:27:46 2014 UTC (10 years ago)
Changed paths: 4
Log Message:
More 'svn log -g' memory usage reduction.  We use a hash to keep track
of all revisions reported so far, i.e. easily a million.

That is 48 bytes / rev, allocated in small chunks.  The first results
in 10s of MB dynamic memory usage while the other results in many 8k
blocks being mmap()ed risking reaching the pre-process limit on some
systems.

We introduce a simple packed bit array data structure to replace
the hash.  For repos < 100M revs, the initialization overhead is less
than 1ms and will amortize as soon as more than 1% of all revs are
reported.

* build.conf
  (bit-array-test): Declare new test exe ...
  (__ALL_TESTS__): ... and list it here.

* subversion/include/private/svn_subr_private.h
  (svn_bit_array__t,
   svn_bit_array__create,
   svn_bit_array__set,
   svn_bit_array__get): Declare the new private data type and its API.

* subversion/libsvn_subr/bit_array.c
  (): New file implementing the new data type.

* subversion/libsvn_repos/log.c
  (send_log,
   do_logs,
   handle_merged_revisions,
   do_logs): When tracking revisons, replace the hash by the new packed
             bit array and corresponding API.  Most of this are mere
             function signature changes.

* subversion/tests/libsvn_subr/bit-array-test.c
  (): Some unit tests for svn_bit_array__*

Changed paths

Path Details
Directorysubversion/trunk/build.conf modified , text changed
Directorysubversion/trunk/subversion/include/private/svn_subr_private.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_repos/log.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_subr/bit_array.c added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26