logo       

svn commit: r13180 - trunk/subversion/libsvn_repos: msg#00361

version-control.subversion.svn

Subject: svn commit: r13180 - trunk/subversion/libsvn_repos

Author: philip
Date: Sun Feb 27 10:18:34 2005
New Revision: 13180

Modified:
trunk/subversion/libsvn_repos/delta.c
trunk/subversion/libsvn_repos/log.c
trunk/subversion/libsvn_repos/reporter.c
Log:
A minor performance optimisation, get multiple props by making
a single svn_fs_revision_proplist call rather than multiple
svn_fs_revision_prop calls.

* subversion/libsvn_repos/log.c (svn_repos_get_logs3): Replace multiple
calls to svn_fs_revision_prop with a single svn_fs_revision_proplist.

* subversion/libsvn_repos/reporter.c (delta_proplists): ditto

* subversion/libsvn_repos/delta.c (delta_proplists): ditto


Modified: trunk/subversion/libsvn_repos/delta.c
Url:
http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_repos/delta.c?view=diff&rev=13180&p1=trunk/subversion/libsvn_repos/delta.c&r1=13179&p2=trunk/subversion/libsvn_repos/delta.c&r2=13180
==============================================================================
--- trunk/subversion/libsvn_repos/delta.c (original)
+++ trunk/subversion/libsvn_repos/delta.c Sun Feb 27 10:18:34 2005
@@ -484,6 +484,7 @@
if (SVN_IS_VALID_REVNUM (committed_rev))
{
svn_fs_t *fs = svn_fs_root_fs (c->target_root);
+ apr_hash_t *r_props;
const char *uuid;

/* Transmit the committed-rev. */
@@ -492,9 +493,12 @@
SVN_ERR (change_fn (c, object, SVN_PROP_ENTRY_COMMITTED_REV,
cr_str, subpool));

+ SVN_ERR (svn_fs_revision_proplist (&r_props, fs, committed_rev,
+ pool));
+
/* Transmit the committed-date. */
- SVN_ERR (svn_fs_revision_prop (&committed_date, fs, committed_rev,
- SVN_PROP_REVISION_DATE, subpool));
+ committed_date = apr_hash_get (r_props, SVN_PROP_REVISION_DATE,
+ APR_HASH_KEY_STRING);
if (committed_date || source_path)
{
SVN_ERR (change_fn (c, object, SVN_PROP_ENTRY_COMMITTED_DATE,
@@ -502,8 +506,8 @@
}

/* Transmit the last-author. */
- SVN_ERR (svn_fs_revision_prop (&last_author, fs, committed_rev,
- SVN_PROP_REVISION_AUTHOR, subpool));
+ last_author = apr_hash_get (r_props, SVN_PROP_REVISION_AUTHOR,
+ APR_HASH_KEY_STRING);
if (last_author || source_path)
{
SVN_ERR (change_fn (c, object, SVN_PROP_ENTRY_LAST_AUTHOR,

Modified: trunk/subversion/libsvn_repos/log.c
Url:
http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_repos/log.c?view=diff&rev=13180&p1=trunk/subversion/libsvn_repos/log.c&r1=13179&p2=trunk/subversion/libsvn_repos/log.c&r2=13180
==============================================================================
--- trunk/subversion/libsvn_repos/log.c (original)
+++ trunk/subversion/libsvn_repos/log.c Sun Feb 27 10:18:34 2005
@@ -340,7 +340,7 @@
((start >= end) ? this_rev-- : this_rev++))
{
svn_string_t *author, *date, *message;
- apr_hash_t *changed_paths = NULL;
+ apr_hash_t *r_props, *changed_paths = NULL;

svn_pool_clear (subpool);

@@ -359,12 +359,13 @@
continue;
}

- SVN_ERR (svn_fs_revision_prop
- (&author, fs, this_rev, SVN_PROP_REVISION_AUTHOR, subpool));
- SVN_ERR (svn_fs_revision_prop
- (&date, fs, this_rev, SVN_PROP_REVISION_DATE, subpool));
- SVN_ERR (svn_fs_revision_prop
- (&message, fs, this_rev, SVN_PROP_REVISION_LOG, subpool));
+ SVN_ERR (svn_fs_revision_proplist (&r_props, fs, this_rev, pool));
+ author = apr_hash_get (r_props, SVN_PROP_REVISION_AUTHOR,
+ APR_HASH_KEY_STRING);
+ date = apr_hash_get (r_props, SVN_PROP_REVISION_DATE,
+ APR_HASH_KEY_STRING);
+ message = apr_hash_get (r_props, SVN_PROP_REVISION_LOG,
+ APR_HASH_KEY_STRING);

/* ### Below, we discover changed paths if the user requested
them (i.e., "svn log -v" means `discover_changed_paths' will

Modified: trunk/subversion/libsvn_repos/reporter.c
Url:
http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_repos/reporter.c?view=diff&rev=13180&p1=trunk/subversion/libsvn_repos/reporter.c&r1=13179&p2=trunk/subversion/libsvn_repos/reporter.c&r2=13180
==============================================================================
--- trunk/subversion/libsvn_repos/reporter.c (original)
+++ trunk/subversion/libsvn_repos/reporter.c Sun Feb 27 10:18:34 2005
@@ -345,7 +345,7 @@
void *object, apr_pool_t *pool)
{
svn_fs_root_t *s_root;
- apr_hash_t *s_props, *t_props;
+ apr_hash_t *s_props, *t_props, *r_props;
apr_array_header_t *prop_diffs;
int i;
svn_revnum_t crev;
@@ -363,16 +363,18 @@
SVN_ERR (change_fn (b, object,
SVN_PROP_ENTRY_COMMITTED_REV, cr_str, pool));

+ SVN_ERR (svn_fs_revision_proplist (&r_props, b->repos->fs, crev, pool));
+
/* Transmit the committed-date. */
- SVN_ERR (svn_fs_revision_prop (&cdate, b->repos->fs, crev,
- SVN_PROP_REVISION_DATE, pool));
+ cdate = apr_hash_get (r_props, SVN_PROP_REVISION_DATE,
+ APR_HASH_KEY_STRING);
if (cdate || s_path)
SVN_ERR (change_fn (b, object, SVN_PROP_ENTRY_COMMITTED_DATE,
cdate, pool));

/* Transmit the last-author. */
- SVN_ERR (svn_fs_revision_prop (&last_author, b->repos->fs, crev,
- SVN_PROP_REVISION_AUTHOR, pool));
+ last_author = apr_hash_get (r_props, SVN_PROP_REVISION_AUTHOR,
+ APR_HASH_KEY_STRING);
if (last_author || s_path)
SVN_ERR (change_fn (b, object, SVN_PROP_ENTRY_LAST_AUTHOR,
last_author, pool));


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise