Evgeny Kotkov <[email protected]> writes:
> + -0.5: kotkov (could not reproduce the improvement with a real-world 1.9
> + server; see my e-mail to <[email protected]>)
I regret to say that I failed to reproduce the improvement with a deployed
server and a couple of real-world repositories.
After setting up a D-series Microsoft Azure virtual machine [1] with
Apache 2.2.29, Subversion 1.9.x and simplest httpd.conf content, I tried to
reproduce the lag by just running 'svn log' for both http:// URIs and working
copies. I couldn't tell the difference by eye, so, I cooked up a dirty patch
for the command-line client that measures the time between svn_client_log5()
call and the print call for the first log entry.
Then, I repeated my tests against the patched and the non-patched 1.9.x
servers. The results are attached, and they do not show any noticeable
difference. Does anybody have a strict reproduction script with a 1.9.x
server that shows the practical benefit from this patch?
Thanks in advance.
[1] http://azure.microsoft.com/en-us/pricing/details/virtual-machines/
Regards,
Evgeny Kotkov
svn log http://server.com/fsfs6-freebsd
613 ms
svn log http://server.com/fsfs7-freebsd
513 ms
svn log http://server.com/fsfs6-freebsd --xml --with-no-revprops
519 ms
svn log http://server.com/fsfs7-freebsd --xml --with-no-revprops
524 ms
svn log http://server.com/fsfs6-freebsd --limit 1
532 ms
svn log http://server.com/fsfs7-freebsd --limit 1
548 ms
svn log http://server.com/fsfs6-freebsd --xml --with-no-revprops --limit 1
526 ms
svn log http://server.com/fsfs7-freebsd --xml --with-no-revprops --limit 1
524 ms
svn log http://server.com/fsfs6-serf/trunk
506 ms
svn log http://server.com/fsfs7-serf/trunk
516 ms
svn log http://server.com/fsfs6-serf/trunk --xml --with-no-revprops
518 ms
svn log http://server.com/fsfs7-serf/trunk --xml --with-no-revprops
539 ms
svn log http://server.com/fsfs6-serf/trunk --limit 1
508 ms
svn log http://server.com/fsfs7-serf/trunk --limit 1
532 ms
svn log http://server.com/fsfs6-serf/trunk --xml --with-no-revprops --limit 1
497 ms
svn log http://server.com/fsfs7-serf/trunk --xml --with-no-revprops --limit 1
492 ms
svn log fsfs6-serf-wc
305 ms
svn log fsfs7-serf-wc
297 ms
svn log fsfs6-serf-wc --xml --with-no-revprops
306 ms
svn log fsfs7-serf-wc --xml --with-no-revprops
289 ms
svn log fsfs6-serf-wc --limit 1
293 ms
svn log fsfs7-serf-wc --limit 1
294 ms
svn log fsfs6-serf-wc --xml --with-no-revprops --limit 1
291 ms
svn log fsfs7-serf-wc --xml --with-no-revprops --limit 1
301 ms
svn log http://server.com/fsfs6-freebsd
569 ms
svn log http://server.com/fsfs7-freebsd
495 ms
svn log http://server.com/fsfs6-freebsd --xml --with-no-revprops
517 ms
svn log http://server.com/fsfs7-freebsd --xml --with-no-revprops
497 ms
svn log http://server.com/fsfs6-freebsd --limit 1
476 ms
svn log http://server.com/fsfs7-freebsd --limit 1
478 ms
svn log http://server.com/fsfs6-freebsd --xml --with-no-revprops --limit 1
508 ms
svn log http://server.com/fsfs7-freebsd --xml --with-no-revprops --limit 1
493 ms
svn log http://server.com/fsfs6-serf/trunk
501 ms
svn log http://server.com/fsfs7-serf/trunk
549 ms
svn log http://server.com/fsfs6-serf/trunk --xml --with-no-revprops
526 ms
svn log http://server.com/fsfs7-serf/trunk --xml --with-no-revprops
492 ms
svn log http://server.com/fsfs6-serf/trunk --limit 1
508 ms
svn log http://server.com/fsfs7-serf/trunk --limit 1
523 ms
svn log http://server.com/fsfs6-serf/trunk --xml --with-no-revprops --limit 1
507 ms
svn log http://server.com/fsfs7-serf/trunk --xml --with-no-revprops --limit 1
512 ms
svn log fsfs6-serf-wc
312 ms
svn log fsfs7-serf-wc
282 ms
svn log fsfs6-serf-wc --xml --with-no-revprops
296 ms
svn log fsfs7-serf-wc --xml --with-no-revprops
301 ms
svn log fsfs6-serf-wc --limit 1
286 ms
svn log fsfs7-serf-wc --limit 1
306 ms
svn log fsfs6-serf-wc --xml --with-no-revprops --limit 1
291 ms
svn log fsfs7-serf-wc --xml --with-no-revprops --limit 1
289 ms
Listen 80
LoadModule dav_module bin/mod_dav.so
LoadModule dav_svn_module bin/mod_dav_svn.so
<Location />
DAV svn
SVNParentPath C:/Repositories
</Location>
Index: subversion/svn/log-cmd.c
===================================================================
--- subversion/svn/log-cmd.c (revision 1673891)
+++ subversion/svn/log-cmd.c (working copy)
@@ -47,6 +47,7 @@
/*** Code. ***/
+static apr_time_t LOG_BEGIN_TIME;
/* Display a diff of the subtree TARGET_PATH_OR_URL@TARGET_PEG_REVISION as
@@ -297,6 +298,7 @@ svn_cl__log_entry_receiver(void *baton,
const char *author;
const char *date;
const char *message;
+ int time;
if (lb->ctx->cancel_func)
SVN_ERR(lb->ctx->cancel_func(lb->ctx->cancel_baton));
@@ -344,6 +346,12 @@ svn_cl__log_entry_receiver(void *baton,
return SVN_NO_ERROR;
}
+ time = apr_time_msec(apr_time_now() - LOG_BEGIN_TIME);
+
+ SVN_ERR(svn_cmdline_printf(pool, "%d ms\n", time));
+
+ return svn_error_create(APR_EGENERAL, NULL, NULL);
+
SVN_ERR(svn_cmdline_printf(pool,
SVN_CL__LOG_SEP_STRING "r%ld | %s | %s",
log_entry->revision, author, date));
@@ -513,6 +521,7 @@ svn_cl__log_entry_receiver_xml(void *baton,
const char *author;
const char *date;
const char *message;
+ int time;
if (lb->ctx->cancel_func)
SVN_ERR(lb->ctx->cancel_func(lb->ctx->cancel_baton));
@@ -672,7 +681,11 @@ svn_cl__log_entry_receiver_xml(void *baton,
else
svn_xml_make_close_tag(&sb, pool, "logentry");
- return svn_cl__error_checked_fputs(sb->data, stdout);
+ time = apr_time_msec(apr_time_now() - LOG_BEGIN_TIME);
+
+ SVN_ERR(svn_cmdline_printf(pool, "%d ms\n", time));
+
+ return svn_error_create(APR_EGENERAL, NULL, NULL);
}
@@ -839,6 +852,9 @@ svn_cl__log(apr_getopt_t *os,
if (!opt_state->quiet)
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
}
+
+ LOG_BEGIN_TIME = apr_time_now();
+
SVN_ERR(svn_client_log5(targets,
&lb.target_peg_revision,
opt_state->revision_ranges,
@@ -862,6 +878,9 @@ svn_cl__log(apr_getopt_t *os,
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
if (!opt_state->quiet)
APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
+
+ LOG_BEGIN_TIME = apr_time_now();
+
SVN_ERR(svn_client_log5(targets,
&lb.target_peg_revision,
opt_state->revision_ranges,