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

Re: svn commit: r1683544 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 4 Jun 2015 13:34:14 +0000

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_at_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. */
Received on 2015-06-04 15:35:35 CEST

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.