Project

General

Profile

Defect #37962

Updated by Go MAEDA over 1 year ago

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 

 h4. Issues with default filter (status: open) *without patch* 

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

 h4. Issues with default filter (status: open) *with patch* 

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

 h4. Time entries without filters and default columns and *without patch* 

 <pre>Completed 200 OK in 858028ms 2879ms (Views: 354.5ms 321.3ms | ActiveRecord: 856707.6ms 1543.3ms | Allocations: 914740)</pre> 888275)</pre> 

 h4. Time entries without filters and default columns and *with patch* 

 <pre>Completed 200 OK in 2879ms 858028ms (Views: 321.3ms 354.5ms | ActiveRecord: 1543.3ms 856707.6ms | Allocations: 888275)</pre> 914740)</pre> 

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

Back