Author: jcorvel
Date: Tue May 31 23:07:54 2011
New Revision: 1129957

URL: http://svn.apache.org/viewvc?rev=1129957&view=rev
Log:
Add another knob, to make it possible to disable the prefix/suffix scanning
of the libsvn_diff processing with a simple define.

* subversion/libsvn_diff/diff_file.c
  (datasources_open): Wrap the calls to find_identical_prefix and
   find_identical_suffix inside an #ifndef DISABLE_PREFIX_SUFFIX_SCANNING
   block.
* notes/knobs
  (): Document DISABLE_PREFIX_SUFFIX_SCANNING

Modified:
    subversion/trunk/notes/knobs
    subversion/trunk/subversion/libsvn_diff/diff_file.c

Modified: subversion/trunk/notes/knobs
URL: 
http://svn.apache.org/viewvc/subversion/trunk/notes/knobs?rev=1129957&r1=1129956&r2=1129957&view=diff
==============================================================================
--- subversion/trunk/notes/knobs (original)
+++ subversion/trunk/notes/knobs Tue May 31 23:07:54 2011
@@ -42,6 +42,7 @@ SVN_DISABLE_ENTRY_CACHE
 SVN_MERGE__ALLOW_ALL_FORWARD_MERGES_FROM_SELF
 SVN_USE_WIN32_CRASHHANDLER
 SVN_DAV_SEND_VTXN_NAME
+DISABLE_PREFIX_SUFFIX_SCANNING
 
 2.3 Debugging Support
 
@@ -185,6 +186,19 @@ SVN_I_LIKE_LATENCY_SO_IGNORE_HTTPV2
   Default:   not defined
   Suggested: defined, not defined
 
+4.7 DISABLE_PREFIX_SUFFIX_SCANNING
+
+  Scope:     libsvn_diff
+  Purpose:   Define this symbol to disable the prefix/suffix scanning
+             of the diff processing, letting all lines be handled by the
+             full-fledged diff algorithm (with LCS algorithm). This define
+             can be useful for focusing on testing the LCS algorithm, or
+             for comparing diff performance with and without prefix/suffix
+             scanning.
+  Range:     definedness
+  Default:   not defined
+  Suggested: not defined
+
 
 5 Defines controling debug support
 ==================================

Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1129957&r1=1129956&r2=1129957&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_file.c Tue May 31 23:07:54 2011
@@ -779,6 +779,8 @@ datasources_open(void *baton,
       /* There will not be any identical prefix/suffix, so we're done. */
       return SVN_NO_ERROR;
 
+#ifndef DISABLE_PREFIX_SUFFIX_SCANNING
+
   SVN_ERR(find_identical_prefix(&reached_one_eof, prefix_lines,
                                 files, datasources_len, file_baton->pool));
 
@@ -788,6 +790,8 @@ datasources_open(void *baton,
     SVN_ERR(find_identical_suffix(suffix_lines, files, datasources_len,
                                   file_baton->pool));
 
+#endif
+
   /* Copy local results back to baton. */
   for (i = 0; i < datasources_len; i++)
     file_baton->files[datasource_to_index(datasources[i])] = files[i];


Reply via email to