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

Re: svn commit: r1673202 - /subversion/trunk/subversion/libsvn_fs_fs/dag.c

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Mon, 13 Apr 2015 18:01:09 +0300

On 13 April 2015 at 17:22, <rhuijben_at_apache.org> wrote:
> Author: rhuijben
> Date: Mon Apr 13 14:22:33 2015
> New Revision: 1673202
>
> URL: http://svn.apache.org/r1673202
> Log:
> Following up on r1673197, use another optimization suggested by stefan2.
>
> * subversion/libsvn_fs_fs/dag.c
> (svn_fs_fs__dag_has_props): Use expanded size to determine if the
> representation stores properties vs just an empty list.
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/dag.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/dag.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?rev=1673202&r1=1673201&r2=1673202&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/dag.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/dag.c Mon Apr 13 14:22:33 2015
> @@ -525,15 +525,9 @@ svn_fs_fs__dag_has_props(svn_boolean_t *
> }
> else
> {
> - apr_hash_t *proplist;
> -
> - /* ### Optimize further.
> - Stefan2 suggested: prop_rep exists and is longer than 4 bytes
> - */
> - SVN_ERR(svn_fs_fs__get_proplist(&proplist, node->fs,
> - noderev, scratch_pool));
> -
> - *has_props = proplist ? (0 < apr_hash_count(proplist)) : FALSE;
> + /* Properties are stored as a standard hash stream,
> + always ending with "END\n" (4 bytes) */
> + *has_props = (noderev->prop_rep->expanded_size > 4);
I'm not sure, but strictly speaking prop representation greater than
four bytes doesn't mean that there is no props: property
representation may contain delta resulting empty property list.

-- 
Ivan Zhakov
Received on 2015-04-13 17:02:40 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.