You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/10/11 18:43:55 UTC

svn commit: r1707997 - /subversion/trunk/subversion/libsvn_repos/rev_hunt.c

Author: stefan2
Date: Sun Oct 11 16:43:55 2015
New Revision: 1707997

URL: http://svn.apache.org/viewvc?rev=1707997&view=rev
Log:
Speed up revprop access in svn_repos_dated_revision() by using the latest
FS API.

* subversion/libsvn_repos/rev_hunt.c
  (get_time): Read revprops from the FS cache if we can.
  (svn_repos_dated_revision): Refresh the revprops only once, at the start
                              of the operation.  This is the only public
                              function that, indirectly, calls the above.
                              Therefore, we still fulfill the visibility
                              guarantees for revprop changes.

Modified:
    subversion/trunk/subversion/libsvn_repos/rev_hunt.c

Modified: subversion/trunk/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/rev_hunt.c?rev=1707997&r1=1707996&r2=1707997&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/trunk/subversion/libsvn_repos/rev_hunt.c Sun Oct 11 16:43:55 2015
@@ -65,8 +65,8 @@ get_time(apr_time_t *tm,
 {
   svn_string_t *date_str;
 
-  SVN_ERR(svn_fs_revision_prop(&date_str, fs, rev, SVN_PROP_REVISION_DATE,
-                               pool));
+  SVN_ERR(svn_fs_revision_prop2(&date_str, fs, rev, SVN_PROP_REVISION_DATE,
+                                FALSE, pool, pool));
   if (! date_str)
     return svn_error_createf
       (SVN_ERR_FS_GENERAL, NULL,
@@ -88,6 +88,7 @@ svn_repos_dated_revision(svn_revnum_t *r
 
   /* Initialize top and bottom values of binary search. */
   SVN_ERR(svn_fs_youngest_rev(&rev_latest, fs, pool));
+  SVN_ERR(svn_fs_refresh_rev_props(fs, pool));
   rev_bot = 0;
   rev_top = rev_latest;