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

[PATCH] The reuse-ra-session branch: optimize RA session usage in merge code

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Fri, 6 Feb 2015 15:53:40 +0300

Hi,

Automatic merge creates minimum 8 connection using code in trunk. The
RA cache framework implemented in reuse-ra-session reduce number of
used RA sessions to 3.

The attached patch for reuse-ra-session branch reworks merge.c a bit
to use just 2 RA sessions. It also resolves RA CACHE TODO: comment and
makes code more clear IMO.

I'm pretty sure about the patch itself. But may be proposed changes
are out of scope ra-session-reuse branch. So this patch should be
committed to reuse-ra-session branch or to trunk after
reuse-ra-session branch will be merged to trunk. Any opinions?

[[[
Optimize and simplify RA session usage in merge code.

* subversion/libsvn_client/merge.c
  (normalize_merge_sources_internal): Open new temporary RA session if
   RA_SESSION argument is NULL. Update docstring to document new behavior.

  (ensure_ra_session_url): Remove now unused function.

  (do_merge): Remove SRC_SESSION argument and code to save/restore session
   URL for passed RA session. Open and release RA session for every merge
   source -- RA cache framework will reuse them if possible. All callers
   are updated.

  (merge_cousins_and_supplement_mergeinfo): Remove URL1_RA_SESSION and
   URL2_RA_SESSION arguments. Pass NULL as RA_SESSION argument to
   normalize_merge_sources_internal() -- it will open/release RA session
   internally. All callers are updated.

  (merge_locked): Remove SESSPOOL and release RA session early. Pass NULL
   as RA_SESSION argument to normalize_merge_sources_internal() -- it
   will open/release RA session internally.

  (merge_reintegrate_locked): Release temporary RA sessions early.

  (merge_peg_locked): Remove SESSPOOL and release RA session early.

  (do_automatic_merge_locked): Release RIGHT_RA_SESSION early. Pass NULL
   as RA_SESSION argument to normalize_merge_sources_internal().
]]]

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com

Received on 2015-02-06 13:54:28 CET

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.