diff --git a/rhodecode/templates/compare/compare_commits.mako b/rhodecode/templates/compare/compare_commits.mako --- a/rhodecode/templates/compare/compare_commits.mako +++ b/rhodecode/templates/compare/compare_commits.mako @@ -20,6 +20,11 @@ ${_('Description')} + ## to speed up lookups cache some functions before the loop + <% + active_patterns = h.get_active_pattern_entries(c.repo_name) + urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) + %> %for commit in c.commit_ranges: - ${h.urlify_commit_message(commit.message, c.repo_name)} + ${urlify_commit_message(commit.message, c.repo_name)} diff --git a/rhodecode/templates/summary/summary_commits.mako b/rhodecode/templates/summary/summary_commits.mako --- a/rhodecode/templates/summary/summary_commits.mako +++ b/rhodecode/templates/summary/summary_commits.mako @@ -11,6 +11,12 @@ ${_('Author')} ${_('Refs')} + +## to speed up lookups cache some functions before the loop +<% + active_patterns = h.get_active_pattern_entries(c.repo_name) + urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) +%> %for cnt,cs in enumerate(c.repo_commits): @@ -44,7 +50,7 @@
-
${h.urlify_commit_message(cs.message, c.repo_name)}
+
${urlify_commit_message(cs.message, c.repo_name)}