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

Re: [PATCH v3] speed up svn_txdelta_apply_instructions

From: 'Stefan Sperling' <stsp_at_elego.de>
Date: Fri, 21 May 2010 15:22:28 +0200

On Fri, May 21, 2010 at 03:03:34PM +0200, Bert Huijben wrote:
>
>
> > -----Original Message-----
> > From: Stefan Sperling [mailto:stsp_at_elego.de]
> > Sent: vrijdag 21 mei 2010 14:51
> > To: Julian Foad
> > Cc: Stefan Fuhrmann; dev_at_subversion.apache.org
> > Subject: Re: [PATCH v3] speed up svn_txdelta_apply_instructions
> >
> > On Fri, May 21, 2010 at 12:54:08PM +0100, Julian Foad wrote:
> > > On Fri, 2010-05-21 at 00:47 +0200, Stefan Fuhrmann wrote:
> > > > - /* Check that we produced the right amount of data. */
> > > > - assert(tpos == window->tview_len);
> > >
> > > The original code looped through 'window->num_ops' operations, and
> > > afterwards asserted that the amount of target data generated by them
> > was
> > > the expected amount.
> > >
> > > The new code loops until the expected amount of target data has been
> > > generated by (some of) the operations. I think, to preserve the
> > > equivalent self-checking, it should then assert that exactly
> > > 'window->num_ops' operations have been used:
> > >
> > > assert(op == last_op);
> >
> > Please use SVN_ERR_ASSERT_NO_RETURN() instead of plain assert().
>
> You can freely use assert if you only want it to run in debug mode.

True, but the SVN_ERR version gives a nice trace on stdout if the
assertion fails.

Stefan
Received on 2010-05-21 15:29:45 CEST

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.