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

Re: svn commit: r1666965 - /subversion/trunk/subversion/mod_dav_svn/reports/log.c

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 16 Mar 2015 15:40:48 +0000

Branko Čibej wrote:
> I'd like to suggest a slightly different flushing policy:
>
> --- log.c (revision 1667032)
> +++ log.c (working copy)
> @@ -68,6 +68,7 @@ struct log_receiver_baton
> /* Helper variables to force early bucket brigade flushes */
> int result_count;
> + int forced_flush_interval;
> int next_forced_flush;
> };
> @@ -310,7 +311,11 @@ log_receiver(void *baton,
> }
> if (lrb->result_count < 2048)
> - lrb->next_forced_flush = lrb->next_forced_flush * 2;
> + {
> + lrb->forced_flush_interval *= 2;
> + lrb->next_forced_flush =
> + lrb->result_count + lrb->forced_flush_interval;
> + }
> }
> return SVN_NO_ERROR;
> @@ -459,7 +464,7 @@ dav_svn__log_report(const dav_resource *resource,
> /* lrb.requested_custom_revprops set above */
> lrb.result_count = 0;
> - lrb.next_forced_flush = 1;
> + lrb.forced_flush_interval = 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
>
>
> In other words, double the interval between successive flushes; instead
> of flushing at results 1, 2, 4, 8, 16 ... this will flush at 1, 3, 7,
> 15, 31 ... which will result in half as many forced flushes without a
> significant difference in the perceived frequency of the first few results.

That's *one fewer* flush, not half as many!

Make the multiplier bigger -- 3 or 4 instead of 2 -- to get fewer
flushes while still exponential. But see my plea in the other email
thread for trying to develop a time-based flushing instead (or perhaps
it could be in combination with counting).

- Julian
Received on 2015-03-16 16:48:00 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.