Author: stefan2
Date: Tue May 16 14:58:54 2017
New Revision: 1795323
URL: http://svn.apache.org/viewvc?rev=1795323&view=rev
Log:
Minor FSFS cache usage tuning by eliminating a few lookups that
cannot be successful.
* subversion/libsvn_fs_fs/cached_data.c
(create_rep_state_body): Unless "block read" is enabled, the
raw window cache won't be populated.
(build_rep_list): Combined windows only get cached when the
whole rep fits into a single window.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1795323&r1=1795322&r2=1795323&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Tue May 16 14:58:54
2017
@@ -866,7 +866,7 @@ create_rep_state_body(rep_state_t **rep_
rs->size = rep->size;
rs->revision = rep->revision;
rs->item_index = rep->item_index;
- rs->raw_window_cache = ffd->raw_window_cache;
+ rs->raw_window_cache = use_block_read(fs) ? ffd->raw_window_cache : NULL;
rs->ver = -1;
rs->start = -1;
@@ -1462,7 +1462,8 @@ build_rep_list(apr_array_header_t **list
&rep, fs, pool, iterpool));
/* for txn reps, there won't be a cached combined window */
- if (!svn_fs_fs__id_txn_used(&rep.txn_id))
+ if ( !svn_fs_fs__id_txn_used(&rep.txn_id)
+ && rep.expanded_size < SVN_DELTA_WINDOW_SIZE)
SVN_ERR(get_cached_combined_window(window_p, rs, &is_cached, pool));
if (is_cached)