vcs: optimized pre-load attributes for better caching.

This commit is contained in:
Marcin Kuzminski 2019-07-17 13:50:26 +02:00
parent 16c2d9514a
commit cab16efa4e
6 changed files with 13 additions and 14 deletions

View file

@ -211,7 +211,7 @@ class RepoCompareView(RepoAppView):
c.source_ref_type = source_ref_type
c.target_ref_type = target_ref_type
pre_load = ["author", "branch", "date", "message"]
pre_load = ["author", "date", "message", "branch"]
c.ancestor = None
try:

View file

@ -687,7 +687,7 @@ class RepoPullRequestsView(RepoAppView, DataGridAppView):
commit_cache = collections.OrderedDict()
missing_requirements = False
try:
pre_load = ["author", "branch", "date", "message", "parents"]
pre_load = ["author", "date", "message", "branch", "parents"]
show_revs = pull_request_at_ver.revisions
for rev in show_revs:
comm = commits_source_repo.get_commit(