Project

General

Profile

Actions

Patch #23196

closed

Speed up Project.allowed_to_condition

Added by Jan from Planio www.plan.io over 8 years ago. Updated almost 8 years ago.

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

0%

Estimated time:

Description

In cases where there are many issues in a project and the Redmine instance has many projects with many enabled modules overall, Project.allowed_to_condition can get painfully slow (>10 sec for a request in our tests on server grade hardware at Planio with large Redmine databases) because the subselect in source:trunk/app/models/project.rb@15586#L184 will get executed for each of the issues found in the project hierarchy.

Since the list of project ids returned by this query will be static for the scope of the call, it makes sense to cache it. In our tests, this results in a significant speedup (milliseconds vs. seconds).

A patch against current trunk is attached.


Files


Related issues

Related to Redmine - Patch #21608: Project#allowed_to_condition performanceClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF