Index: subversion/mod_dav_svn/reports/log.c
===================================================================
--- subversion/mod_dav_svn/reports/log.c	(revision 1666817)
+++ subversion/mod_dav_svn/reports/log.c	(working copy)
@@ -65,6 +65,10 @@
 
   /* whether the client can handle encoded binary property values */
   svn_boolean_t encode_binary_props;
+
+  /* Helper variables to force early bucket brigade flush */
+  int result_count;
+  int next_forced_flush;
 };
 
 
@@ -282,6 +286,21 @@
   SVN_ERR(dav_svn__brigade_puts(lrb->bb, lrb->output,
                                 "</S:log-item>" DEBUG_CR));
 
+  /* In general APR will flush the bucket every 8 KByte, but log items
+     may not be generated that fast. This algorithm makes sure the client
+     gets the first two results very fast (but less efficient), while it
+     gradually removes its performance hit and falls back to the APR
+     buffer handling */
+  lrb->result_count++;
+  if (lrb->result_count == lrb->next_forced_flush)
+    {
+      apr_status_t status = ap_filter_flush(lrb->bb, lrb->output);
+      if (status)
+        return svn_error_create(status, NULL, NULL);
+
+      lrb->next_forced_flush = lrb->next_forced_flush * 2;
+    }
+
   return SVN_NO_ERROR;
 }
 
@@ -427,6 +446,9 @@
   lrb.stack_depth = 0;
   /* lrb.requested_custom_revprops set above */
 
+  lrb.result_count = 0;
+  lrb.next_forced_flush = 1;
+
   /* Our svn_log_entry_receiver_t sends the <S:log-report> header in
      a lazy fashion.  Before writing the first log message, it assures
      that the header has already been sent (checking the needs_header
