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

Re: [PATCH][merge-tracking]Better way to iterate the locally scoped hashes

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-01-22 11:43:23 CET

Peter Lundblad wrote:
> Kamesh Jayachandran writes:
>
>> Hi All,
>> Find the attached patch and log.
>>
>> With regards
>> Kamesh Jayachandran
>>
>> [[[
>>
>> Better way to iterate locally scoped hashes.
>>
>> * subversion/libsvn_client/diff.c
>> (display_mergeinfo_diff, update_wc_merge_info, do_child_merges):
>> Use hash's iterator rather than allocating from the pool for
>> locally scoped hashes.
>>
>>
>
> I am not sure I find this way "better". Sure, it does avoid a slight
> allocation out of a pool. OTOH, when one reads this cod,e one has to
> think "hey, where does this hash table come from, is it considered
> read-only, and am I sure no caller up the call chain doesn't pass it
> to multiple threads at a time?" Is this microoptimization really worth
>
Out of 5 instances where this patch changes, 3 are straight forward
local hash tables. And no new threads could have access to this local
pointers.
We already do this at 'determine_merges_performed' like
'apr_hash_first(NULL, notify_b->skipped_paths)'.

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 22 11:42:57 2007

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