Patch #19706

Issue show : optimizations

Added by Jérôme BATAILLE about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Performance
Target version:2.6.5

Description

# in app/controllers/issue_controller.rb in
def show
  @changesets = @issue.changesets.visible.includes([:repository, :user, :issues]).all

# in app/helper/issues_helper in :
def render_descendants_tree(issue)
  issue_list(issue.descendants.visible.includes([:status, :priority, :tracker]).sort_by(&:lft)) do |child, level|

Associated revisions

Revision 14239
Added by Jean-Philippe Lang about 3 years ago

Preload changeset associations (#19706).

Revision 14240
Added by Jean-Philippe Lang about 3 years ago

Preload issue associations.

History

#1 Updated by Jérôme BATAILLE about 3 years ago

Some optimizations could be made in parse_redmine_links too, because issues and priorities are loaded multiple times (from cache though)

#2 Updated by Jean-Philippe Lang about 3 years ago

  • Category set to Performance
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.0.3

Patch committed with slight changes, thanks.

#3 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from Resolved to Closed

#4 Updated by Jean-Philippe Lang about 3 years ago

  • Target version changed from 3.0.3 to 2.6.5

#5 Updated by Jérôme BATAILLE about 3 years ago

Thanks for having reviewed this patch !

Also available in: Atom PDF