Project

General

Profile

Actions

Feature #42682

closed

Optimize the rendering of versions on the roadmap by preloading the email addresses of issue assignees

Added by Go MAEDA 4 days ago. Updated 3 days ago.

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

0%

Estimated time:
Resolution:
Fixed

Description

The attached patch improves the performance of the roadmap view by preloading the email_address of issue assignees, which is used for displaying Gravatar icons. By preloading it, N+1 queries are avoided when rendering versions and their associated issues.

The test results below show the performance of the /roadmap page with 60 versions and 3000 issues:

Without the patch:

Completed 200 OK in 1910ms (Views: 1712.9ms | ActiveRecord: 110.1ms (9539 queries, 9181 cached) | GC: 160.8ms)
Completed 200 OK in 1920ms (Views: 1739.1ms | ActiveRecord: 91.0ms (9539 queries, 9181 cached) | GC: 158.0ms)
Completed 200 OK in 1934ms (Views: 1759.1ms | ActiveRecord: 92.1ms (9539 queries, 9181 cached) | GC: 159.4ms)
Completed 200 OK in 1962ms (Views: 1775.1ms | ActiveRecord: 95.7ms (9539 queries, 9181 cached) | GC: 165.3ms)
Completed 200 OK in 1948ms (Views: 1764.1ms | ActiveRecord: 74.6ms (9539 queries, 9181 cached) | GC: 163.0ms)

With the patch applied:

Completed 200 OK in 1092ms (Views: 924.3ms | ActiveRecord: 59.9ms (3539 queries, 3183 cached) | GC: 117.8ms)
Completed 200 OK in 1040ms (Views: 880.7ms | ActiveRecord: 54.1ms (3539 queries, 3183 cached) | GC: 75.0ms)
Completed 200 OK in 1072ms (Views: 894.1ms | ActiveRecord: 64.9ms (3539 queries, 3183 cached) | GC: 117.9ms)
Completed 200 OK in 1134ms (Views: 987.3ms | ActiveRecord: 57.4ms (3539 queries, 3183 cached) | GC: 130.1ms)
Completed 200 OK in 1051ms (Views: 884.9ms | ActiveRecord: 64.3ms (3539 queries, 3183 cached) | GC: 81.8ms)

Files

Actions

Also available in: Atom PDF