Project

General

Profile

Actions

Defect #35927

open

Slow loading of /time_entries/new

Added by Mark J about 3 years ago. Updated about 3 years ago.

Status:
Confirmed
Priority:
Normal
Category:
Time tracking
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Opening /time_entries/new takes 10s, when we have 1000 users with 2 different groups that one has ~10 users and other has all other users.

I have looked into code and it seems I have found the issue, attaching additional info via screens. Basically if project has a lot of users `assignable_users` enumerates each users permissions by one, creating 2*X (X=number users) sql queries.

I'm hosting redmine with help of docker official image.
Environment:
Redmine version 4.2.1.stable
Ruby version 2.7.4-p191 (2021-07-07) [x86_64-linux]
Rails version 5.2.5
Environment debug
Database adapter SQLServer
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.10.4
Mercurial 4.8.2
Bazaar 2.8.0
Git 2.20.1
Filesystem
Redmine plugins:
no plugin installed


Files

ConEmu64_UubTYutl5G.png (579 KB) ConEmu64_UubTYutl5G.png debug log of server with run queries Mark J, 2021-09-28 13:00
Code_jzSYRAKaoR.png (77.2 KB) Code_jzSYRAKaoR.png code location Mark J, 2021-09-28 13:00
Actions

Also available in: Atom PDF