Mercurial > kallithea
changeset 3025:f61adead3520 beta
Added option to ini files for controlling full cache of VCS instances.
This can increase performance for huge repositories like 300K changesets
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 24 Nov 2012 01:59:14 +0100 |
parents | 1361ddff4486 |
children | ff9e0cbfcd7f |
files | development.ini production.ini rhodecode/config/deployment.ini_tmpl rhodecode/model/db.py |
diffstat | 4 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/development.ini Sat Nov 24 00:42:48 2012 +0100 +++ b/development.ini Sat Nov 24 01:59:14 2012 +0100 @@ -60,6 +60,7 @@ index_dir = %(here)s/data/index app_instance_uuid = rc-develop cut_off_limit = 256000 +vcs_full_cache = True force_https = false commit_parse_limit = 25 use_gravatar = true
--- a/production.ini Sat Nov 24 00:42:48 2012 +0100 +++ b/production.ini Sat Nov 24 01:59:14 2012 +0100 @@ -60,6 +60,7 @@ index_dir = %(here)s/data/index app_instance_uuid = rc-production cut_off_limit = 256000 +vcs_full_cache = True force_https = false commit_parse_limit = 50 use_gravatar = true
--- a/rhodecode/config/deployment.ini_tmpl Sat Nov 24 00:42:48 2012 +0100 +++ b/rhodecode/config/deployment.ini_tmpl Sat Nov 24 01:59:14 2012 +0100 @@ -60,6 +60,7 @@ index_dir = %(here)s/data/index app_instance_uuid = ${app_instance_uuid} cut_off_limit = 256000 +vcs_full_cache = True force_https = false commit_parse_limit = 50 use_gravatar = true
--- a/rhodecode/model/db.py Sat Nov 24 00:42:48 2012 +0100 +++ b/rhodecode/model/db.py Sat Nov 24 01:59:14 2012 +0100 @@ -941,7 +941,10 @@ @LazyProperty def scm_instance(self): - return self.scm_instance_cached() + import rhodecode + full_cache = str2bool(rhodecode.CONFIG.get('vcs_full_cache')) + if full_cache: + return self.scm_instance_cached() return self.__get_instance() def scm_instance_cached(self, cache_map=None):