subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1035882 - /subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c
Date Wed, 17 Nov 2010 00:36:44 GMT
Author: stefan2
Date: Wed Nov 17 00:36:44 2010
New Revision: 1035882

URL: http://svn.apache.org/viewvc?rev=1035882&view=rev
Log:
Prefer using svn_fs_fs__id_unparse to identify a noderev since we
do that in all other places as well. This function is called relatively
seldom, thus there is no reason to use a special implementation here.

* subversion/libsvn_fs_fs/fs_fs.c:
  (get_noderev_cache_key): don't re-invent the wheel (unless necessary)

Patch by: danielsh

Modified:
    subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c?rev=1035882&r1=1035881&r2=1035882&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c Wed Nov 17 00:36:44 2010
@@ -2234,15 +2234,14 @@ err_dangling_id(svn_fs_t *fs, const svn_
      id_str->data, fs->path);
 }
 
-/* Combine the revision and offset of the ID to a string that will
- * be used as a cache key. Allocations will be made from POOL.
+/* Return a string that uniquely identifies the noderev with the
+ * given ID, for use as a cache key.
  */
 static const char *
 get_noderev_cache_key(const svn_fs_id_t *id, apr_pool_t *pool)
 {
-  return svn_fs_fs__combine_two_numbers(svn_fs_fs__id_rev(id),
-                                        svn_fs_fs__id_offset(id),
-                                        pool);
+  const svn_string_t *id_unparsed = svn_fs_fs__id_unparse(id, pool);
+  return id_unparsed->data;
 }
 
 /* Look up the NODEREV_P for ID in FS' node revsion cache. If noderev 



Mime
View raw message