subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Huijben <b...@qqmail.nl>
Subject Re: svn commit: r1683544 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Date Thu, 04 Jun 2015 13:34:14 GMT
I would say it is safer to cache SVN_INVALID_REVNUM (or another certainly invalid revision
number) than to set the potentially valid r0.


Bert






Sent from Surface





From: Ivan Zhakov
Sent: ‎Thursday‎, ‎June‎ ‎4‎, ‎2015 ‎3‎:‎25‎ ‎PM
To: commits@subversion.apache.org





Author: ivan
Date: Thu Jun  4 13:25:21 2015
New Revision: 1683544

URL: http://svn.apache.org/r1683544
Log:
Minor FSFS optimization: do not read 'current' file on FS open to save
cached youngest revision. Current API users often call 
svn_fs_youngest() right after svn_fs_open() which cause 'current' file 
read again.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__open): Do not call get_youngest(). Just initialize
   ffd->youngest_rev_cache to zero.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1683544&r1=1683543&r2=1683544&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Jun  4 13:25:21 2015
@@ -1126,7 +1126,9 @@ svn_fs_fs__open(svn_fs_t *fs, const char
   /* Global configuration options. */
   SVN_ERR(read_global_config(fs));
 
-  return get_youngest(&(ffd->youngest_rev_cache), fs, pool);
+  ffd->youngest_rev_cache = 0;
+
+  return SVN_NO_ERROR;
 }
 
 /* Wrapper around svn_io_file_create which ignores EEXIST. */
Mime
View raw message