/[Apache-SVN]
ViewVC logotype

Revision 1586922


Jump to revision: Previous Next
Author: stefan2
Date: Sun Apr 13 04:40:40 2014 UTC (10 years ago)
Changed paths: 4
Log Message:
[Reverted in r1598291]

Speed up file / stream comparison, i.e. minimize the processing overhead
for finding the first mismatch.

The approach is two-sided.  Instead of fetching SVN__STREAM_CHUNK_SIZE
from all sources before comparing data, we start with a much lower 4kB
and increase the chunk size until we reach SVN__STREAM_CHUNK_SIZE while
making sure that all reads are naturally aligned.  So, we quickly find
mismatches near the beginning of the file.

On the other end side, we bump the SVN__STREAM_CHUNK_SIZE to 64kB which
gives better throughput for longer distances to the first mismatch -
without causing ill effects in APR's memory management.

* subversion/include/svn_types.h
  (SVN__STREAM_CHUNK_SIZE): Bump to 64k and add some documentation on
                            the general restrictions for future changes.

* subversion/include/private/svn_io_private.h
  (svn_io__next_chunk_size): New utility function generating the new
                             read block size sequence.

* subversion/libsvn_subr/io.c
  (svn_io__next_chunk_size): Implement.
  (contents_identical_p,
   contents_three_identical_p): Let the new utility determine the read
                                block size.

* subversion/libsvn_subr/stream.c
  (svn_stream_contents_same2): Ditto.

Changed paths

Path Details
Directorysubversion/trunk/subversion/include/private/svn_io_private.h modified , text changed
Directorysubversion/trunk/subversion/include/svn_types.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_subr/io.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_subr/stream.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26