[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Revert r23859 - conditionalize skipped sleeping for timestamps on maintainer mode

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2007-11-04 06:31:06 CET

I would like to propose that we revert r23859 (log message and diff below).

In my opinion, we should never have code that is externally different
based on the value of SVN_DEBUG. If such conditional code paths had a
bug, we'd never find it easily.

This will also have the happy side-effect of:
- Allowing normal users to bypass the sleep for timestamps if it they
choose to do so (if it's good enough for us to enable in maintainer
mode, it's good enough for users, IMO)
- Allowing developers not enabling maintainer-mode to get the test
suite speedups (as we already code the logic to be smart about
timestamps in the tests)

But, isolating this optimization only to when maintainer mode is active is bad.

For the record, for me, 'make check' now goes from 46:05.98 to 4:56.59
with this change reverted.

Thoughts? -- justin

------------------------------------------------------------------------
r23859 | dionisos | 2007-03-15 15:10:24 -0700 (Thu, 15 Mar 2007) | 5 lines

Conditionalize skipped sleeping for timestamps on maintainer mode.

* subversion/libsvn_subr/time.c
  (svn_sleep_for_timestamps): Make envvar check conditional on SVN_DEBUG.

------------------------------------------------------------------------

Index: time.c
===================================================================
--- time.c (revision 23858)
+++ time.c (revision 23859)
@@ -289,13 +289,18 @@
 svn_sleep_for_timestamps(void)
 {
   apr_time_t now, then;
+
+#ifdef SVN_DEBUG
   const char *env_val = getenv("SVN_SLEEP_FOR_TIMESTAMPS");

   /* Sleep until the next second tick, plus a tenth of a second for margin. */
   if (! env_val || apr_strnatcasecmp(env_val, "no") != 0)
     {
+#endif
       now = apr_time_now();
       then = apr_time_make(apr_time_sec(now) + 1, APR_USEC_PER_SEC / 10);
       apr_sleep(then - now);
+#ifdef SVN_DEBUG
     }
+#endif
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 4 06:31:15 2007

This is an archived mail posted to the Subversion Dev mailing list.