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

Re: svn commit: rev 1985 - trunk/subversion/libsvn_client trunk/subversion/mod_dav_svn trunk/subversion/libsvn_ra_dav

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-05-21 04:16:58 CEST

Greg Stein <gstein@lyra.org> writes:

> On Mon, May 20, 2002 at 06:47:30PM -0500, sussman@tigris.org wrote:
> >...
> > +++ trunk/subversion/libsvn_ra_dav/fetch.c Mon May 20 18:47:30 2002
> >...
> > + /* if we're within a <resource> tag, then just call the generic
> > + RA set_wcprop_callback directly; no need to use the
> > + update-editor. */
> > + if ((rb->current_wcprop_path != NULL)
> > + && rb->ras->callbacks->set_wc_prop)
> > + {
> > + svn_string_t *href_val = svn_string_create(rb->href->data,
> > + rb->ras->pool);
>
> This makes a useless copy of the value. The code will be faster and less
> resource intensive if you simply do:
>
> svn_string_t href_val;
>
> href_val.data = rb->href->data;
> href_val.len = rb->href->len;

Duh, yeah. Will fix.

> > + CHKERR( rb->ras->callbacks->set_wc_prop(rb->ras->callback_baton,
> > + rb->current_wcprop_path,
> > + rb->vuh.name->data,
>
> The rb->vuh.name->data should be replaced with: SVN_RA_DAV__LP_VSN_URL
>
> (the need to keep 'vuh' around is an artifact of the old editor interface;
> as we migrate to the new interface, we'll be tossing it. set_wc_prop
> already uses a sane interface, so 'vuh.name' isn't needed there)

Huh? rb->vuh is a structure that is being reused over and over, with
a fixed unchanging 'name' value of SVN_RA_DAV__LP_VSN_URL. Why would
you want to toss it? Isn't it more efficient this way?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 21 04:20:44 2002

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.