Project

General

Profile

Actions

Defect #10992

open

Issue details page loads slowly with lots of watchers

Added by Duane Hughes almost 12 years ago. Updated almost 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Hi,

I'm currently testing a redmine implementation for our company's issue reporting needs. We have a lot of users at our company who are permitted to submit problem reports (They authenticate via LDAP). I've added them to the Reporters group for our redmine project. This means that they show up as watchers if you click "New Issue", or i presume get loaded in the background if you open an existing issue. We have 820 users currently. On our 4-core processor system with 4096MB RAM, the "New Issues" page takes about 7 seconds to load. I enabled INFO logging for our production environment and the numbers are as follows:

Processing IssuesController#new (for x.x.x.x at 2012-05-22 15:27:56) [GET]
  Parameters: {"controller"=>"issues", "project_id"=>"support", "action"=>"new"}
Rendering template within layouts/base
Rendering issues/new
Completed in 4942ms (View: 4668, DB: 140) | 200 OK [http://servername/support/projects/support/issues/new]

As can be seen, it takes 4668ms just to render the page, although the DB lookup is fast enough.

I'm running Redmine 1.4.2 on Apache2 (2.2.22) with libapache2-mod-passenger (2.2.11) on Ubuntu 12.04. Database runs on mysql 5.5.22.

My environment is as follows:

Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.8.15
Rack version              1.1.3
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Application root          /usr/share/redmine
Environment               production
Database adapter          mysql
Database schema version   20120301153455

I've also removed all the plugins I added to eliminate any of them as the possible source of the problem, and the numbers above are generated after doing that.

Could you provide any suggestions for optimizing performance to circumvent this problem? Or could this be an issue with how the list of watchers or the page is rendered or called in the background? Could the watchers list be called in some other way to prevent it being loaded until actually required (instead of rendering all 820 watchers checkboxes?) Needless to say, as soon as I remove the 820 users as members of our project, the Issues detail and New Issues page load lightning fast.

FWIW, I've tried this on a lighttpd server with mod_fastcgi, and the page loads slightly faster at 5 seconds (shaves 2 seconds off the loading time), but this remains an issue.

Any help would be appreciated. Thanks!


Files

removes_watcher_checkboxes.patch (581 Bytes) removes_watcher_checkboxes.patch Jean-Philippe Lang, 2012-05-24 19:10
Actions #1

Updated by Duane Hughes almost 12 years ago

I should also add that this is not just to do with rendering the watchers checkboxes. Even if the user does not have rights to view the watchers list, add or delete watchers, the page still loads at the same rate.

Actions #2

Updated by Jean-Philippe Lang almost 12 years ago

Now that Redmine 1.4 offers a "Search for watchers" link that opens a dialog box to add watchers, you could simply remove the initial checkboxes from the view (see attached patch). It should load faster, can you confirm?

Maybe it should be made the default behaviour.

Actions #3

Updated by Duane Hughes almost 12 years ago

Hi,

Thanks for the patch, it does indeed load a little faster. It seems to shave off two seconds on average. I also like that watchers are shown once you select them, but the whole list does not render. I think it makes the page look tidier, especially if you have a lot of potential watchers.

Here are the timings I get now. They're still slow, but markedly improved:

Processing IssuesController#new (for x.x.x.x at 2012-05-24 20:31:51) [GET]
  Parameters: {"controller"=>"issues", "action"=>"new", "project_id"=>"support"}
Rendering template within layouts/base
Rendering issues/new
Completed in 3501ms (View: 3199, DB: 185) | 200 OK [http://servername/support/projects/support/issues/new]

Processing IssuesController#new (for x.x.x.x at 2012-05-24 20:32:23) [GET]
  Parameters: {"controller"=>"issues", "action"=>"new", "project_id"=>"support"}
Rendering template within layouts/base
Rendering issues/new
Completed in 3279ms (View: 3036, DB: 120) | 200 OK [http://servername/support/projects/support/issues/new]

So it seems there is still some rendering going on somewhere? As I mention, I've removed all plugins, and when removing the 820 users and leaving only 10 or so as reporters the form loads in a second or less. Thanks for your interest and help so far.

Actions #4

Updated by Jean-Philippe Lang almost 12 years ago

The 820 users must be rendered in the 'Assignee' drop down as well. It may be the issue.

What response time do you get if you keep the 820 members but uncheck "Issues can be assigned to this role" on their role (in Administration -> Roles)? They should not appear in the drop down.

Actions #5

Updated by Duane Hughes almost 12 years ago

Hi, yes, that was the case. It helped by a further 2 seconds.

Rendering template within layouts/base
Rendering issues/new
Completed in 2000ms (View: 1870, DB: 3)

Thanks for the suggestion.

Actions

Also available in: Atom PDF