subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1446194 - /subversion/trunk/subversion/libsvn_delta/svndiff.c
Date Thu, 14 Feb 2013 14:15:56 GMT
Author: rhuijben
Date: Thu Feb 14 14:15:55 2013
New Revision: 1446194

URL: http://svn.apache.org/r1446194
Log:
* subversion/libsvn_delta/svndiff.c
  (svn_txdelta_parse_svndiff): Avoid burning CPU cycles when all we would
    do with the processed windows is sending them to the bitbucket.

Modified:
    subversion/trunk/subversion/libsvn_delta/svndiff.c

Modified: subversion/trunk/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/svndiff.c?rev=1446194&r1=1446193&r2=1446194&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/trunk/subversion/libsvn_delta/svndiff.c Thu Feb 14 14:15:55 2013
@@ -944,8 +944,17 @@ svn_txdelta_parse_svndiff(svn_txdelta_wi
   db->header_bytes = 0;
   db->error_on_early_close = error_on_early_close;
   stream = svn_stream_create(db, pool);
-  svn_stream_set_write(stream, write_handler);
-  svn_stream_set_close(stream, close_handler);
+
+  if (handler != svn_delta_noop_window_handler)
+    {
+      svn_stream_set_write(stream, write_handler);
+      svn_stream_set_close(stream, close_handler);
+    }
+  else
+    {
+      /* And else we just ignore everything as efficiently as we can.
+         by not hooking the stream at all */
+    }
   return stream;
 }
 



Mime
View raw message