Project

General

Profile

Actions

Defect #37962

open

Missing where cause for allowed_to_condition

Added by Alexander Meindl over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Performance
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

A missing cause in a database query is missing, namely if allowed_to_condition checks enabled modules.
In Redmine instances with many projects this leads to massiv performance issues.

The attached patch solves this bug. All tests are running with it (no errors) and I found no side effects when using it.

Here are some statistics with performance tests to analyze what the fix accomplishes:

  • Redmine 5.0-stable
  • Ruby 3.1.2
  • 1.200 Projects
  • 52.000 issues
  • 225.066 time entries

Issues with default filter (status: open) without patch

Completed 200 OK in 5402ms (Views: 291.8ms | ActiveRecord: 5066.4ms | Allocations: 278652)

Issues with default filter (status: open) with patch

Completed 200 OK in 1228ms (Views: 262.1ms | ActiveRecord: 925.3ms | Allocations: 279716)

Time entries without filters and default columns and without patch

Completed 200 OK in 858028ms (Views: 354.5ms | ActiveRecord: 856707.6ms | Allocations: 914740)

Time entries without filters and default columns and with patch

Completed 200 OK in 2879ms (Views: 321.3ms | ActiveRecord: 1543.3ms | Allocations: 888275)

It would be great, if this patch could be appled to current stable to solve this massive performance issues.


Files

allowed_to_condition.patch (2.76 KB) allowed_to_condition.patch Alexander Meindl, 2022-11-24 09:54
Actions

Also available in: Atom PDF