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

Re: [PATCH] Use svn_fs_fs__id_unparse() to construct the noderev cache key

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Wed, 17 Nov 2010 00:26:34 +0100

On 17.11.2010 00:11, Daniel Shahaf wrote:
> Hyrum K. Wright wrote on Tue, Nov 16, 2010 at 13:02:04 -0600:
>> Since Daniel is a committer, I suspect he will track this change
>> (relieving you of the burden of doing so).
>>
> That's correct.
> -Hyrum
>
>
I'm not decided about that patch, yet. id_unparse is
relatively slow and I basically need to do some measurement
whether that is relevant (i.e. called frequently) or not.

-- Stefan^2.
>> On Mon, Nov 15, 2010 at 4:22 PM, Gavin Beau Baumanis
>> <gavinb_at_thespidernet.com> wrote:
>>> Ping. This has received no further comments.
>>>
>>>
>>>
>>> Gavin "Beau" Baumanis
>>> E: gavinb_at_thespidernet.com
>>>
>>>
>>> On 31/10/2010, at 12:42 PM, Daniel Shahaf wrote:
>>>
>>>> Is there a reason not to apply this "let's not reinvent the wheel" patch?
>>>>
>>>> [[[
>>>> Index: subversion/libsvn_fs_fs/fs_fs.c
>>>> ===================================================================
>>>> --- subversion/libsvn_fs_fs/fs_fs.c (revision 1029231)
>>>> +++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
>>>> @@ -2205,15 +2205,14 @@ read_rep_offsets(representation_t **rep_p,
>>>> return SVN_NO_ERROR;
>>>> }
>>>>
>>>> -/* Combine the revision and offset of the ID to a string that will
>>>> - * be used as a cache key. Allocations will be made from POOL.
>>>> +/* Return a string that uniquely identifies the noderev with the
>>>> + * given ID, for use as a cache key.
>>>> */
>>>> static const char *
>>>> get_noderev_cache_key(const svn_fs_id_t *id, apr_pool_t *pool)
>>>> {
>>>> - return svn_fs_fs__combine_two_numbers(svn_fs_fs__id_rev(id),
>>>> - svn_fs_fs__id_offset(id),
>>>> - pool);
>>>> + const svn_string_t *id_unparsed = svn_fs_fs__id_unparse(id, pool);
>>>> + return id_unparsed->data;
>>>> }
>>>>
>>>> /* Look up the NODEREV_P for ID in FS' node revsion cache. If noderev
>>>> ]]]
>>>>
>>>> (It does not resolve my test failures.)
>>>>
>>>> Daniel
Received on 2010-11-17 00:27:04 CET

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