subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1327560 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Date Wed, 18 Apr 2012 16:11:59 GMT
Author: rhuijben
Date: Wed Apr 18 16:11:58 2012
New Revision: 1327560

URL: http://svn.apache.org/viewvc?rev=1327560&view=rev
Log:
* subversion/libsvn_repos/reporter.c
  (delta_files): Compare the delta handler to the common no-op window handler,
    to allow avoiding the opening of delta streams when not necessary.
    This simple optimization will be hit for every modified file when updating
    using ra_serf (or neon in separate file mode).

Modified:
    subversion/trunk/subversion/libsvn_repos/reporter.c

Modified: subversion/trunk/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/reporter.c?rev=1327560&r1=1327559&r2=1327560&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/reporter.c (original)
+++ subversion/trunk/subversion/libsvn_repos/reporter.c Wed Apr 18 16:11:58 2012
@@ -640,14 +640,20 @@ delta_files(report_baton_t *b, void *fil
   /* Send the delta stream if desired, or just a NULL window if not. */
   SVN_ERR(b->editor->apply_textdelta(file_baton, s_hex_digest, pool,
                                      &dhandler, &dbaton));
-  if (b->text_deltas)
+
+  if (dhandler != svn_delta_noop_window_handler)
     {
-      SVN_ERR(svn_fs_get_file_delta_stream(&dstream, s_root, s_path,
-                                           b->t_root, t_path, pool));
-      return svn_txdelta_send_txstream(dstream, dhandler, dbaton, pool);
+      if (b->text_deltas)
+        {
+          SVN_ERR(svn_fs_get_file_delta_stream(&dstream, s_root, s_path,
+                                               b->t_root, t_path, pool));
+          SVN_ERR(svn_txdelta_send_txstream(dstream, dhandler, dbaton, pool));
+        }
+      else
+        SVN_ERR(dhandler(NULL, dbaton));
     }
-  else
-    return dhandler(NULL, dbaton);
+
+  return SVN_NO_ERROR;
 }
 
 /* Determine if the user is authorized to view B->t_root/PATH. */



Mime
View raw message