Project

General

Profile

Actions

Patch #40798

closed

Optimize Version model

Added by Go MAEDA about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The attached patch improves the performance of several methods in the Version model such as Version#issues_count, FixedIssuesExtension#completed_percent, FixedIssuesExtension#closed_percent, and FixedIssuesExtension#issues_progress.

These methods use count method to get the total number of fixed issues in the version. It performs an SQL count query every time it is called. This patch replaces count with open_count + closed_count in order to use cached values instead of performing SQL count queries.

The change has an effect on Gantt as well as Roadmap.


Files

Actions

Also available in: Atom PDF