Log Message: |
Reduce the perceived very slow operation of svn log URL via mod_dav on
large result sets that return not that much data, by flushing the
httpd output cache a few times for the 'first few log results'.
Usually httpd tries to produce data 8 KByte at a time, but depending on
the type of log request this may be every few hundred revisions and
in not that uncommon cases on svn.apache.org only after 5-30 seconds.
This patch explicitly flushes the caching after 1,2,4,8,16,...2048
results, so the log handling will appear to be streamy as expected,
while it falls back to the original handling when retrieving very
many/all revisions.
In theory this makes the log report a bit slower, because flushes cost
a bit performance... but in general you (and some operations like
'svn merge') just want the first result (or first few results) as fast
as possible. (And in many cases ^C or SVN_ERR_CEASE_INVOCATION, the
remaining results).
This patch should reduce the initial delay before the first result of:
$ svn log ^/subversion/branches/1.8.x -q
which is currently about 10 seconds for me, to less than a second.
See the '1.9.x JavaHL: long initial delay when performing a log' thread
for an even worse example.
This minor fix migh just fix one of the reasons why many users call
Subversion slow, and prefer a local repository.
* subversion/mod_dav_svn/reports/log.c
(log_receiver_baton): Add two variables.
(log_receiver): Add explicit flush code on every 2^x for x 0..11 revisions.
(dav_svn__log_report): Update baton init.
|