View Issue Details

IDProjectCategoryView StatusLast Update
0020242mantisbtperformancepublic2016-06-12 00:42
ReportercproensaAssigned Tocproensa 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3.0-beta.3 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020242: performance in manage project page with large user count
Description

When loading the manage project page, "manage_proj_edit_page.php",
especially with the option "show global users", takes quite a lot of time to load.

The problem is this call:

if( project_includes_user( $f_project_id, $t_user['id'] ) ) {

which creates a separate sql query for each user.

probably, given the context, that call is not even needed.

TagsNo tags attached.

Activities

cproensa

cproensa

2015-11-04 18:18

developer   ~0051818

PR for performance improvements in project manage page:
https://github.com/mantisbt/mantisbt/pull/674/

Related Changesets

MantisBT: master b499d5c8

2015-11-04 15:24:21

cproensa


Committer: dregad Details Diff
Remove call to project_includes_user

project_includes_user() is called once for every user that is displayed
in project manage page, to check if user is directly assigned to the
project and print the "remove" button. This function performs a db
query for each user, which degrades performance as user count grows, and
is especilally severe on public projects.

Instead, fetch all local user at once and compare against the saved
array if user is directly assigned to the project.

Fixes 0020242
mod - manage_proj_edit_page.php Diff File

MantisBT: master c596d45b

2015-11-04 16:39:31

cproensa


Committer: dregad Details Diff
Dont create multiple tokens for buttons

Call print_button() with a previously created token which is reutilized
for all buttons.

Previously, for each button a new token was created, which is a
expensive operation that read/writes session variables repeated times.

Issue 0020242
mod - manage_proj_edit_page.php Diff File

MantisBT: master f82565ae

2015-11-04 16:52:59

cproensa


Committer: dregad Details Diff
Dont use token for manage_proj_edit_page

The destination page does not verify form tokens, so call print_button()
with the token parameter OFF.

Issue 0020242
mod - manage_proj_edit_page.php Diff File

Issue History

Date Modified Username Field Change
2015-10-31 21:40 cproensa New Issue
2015-11-04 18:18 cproensa Note Added: 0051818
2016-03-07 05:44 dregad Changeset attached => MantisBT master b499d5c8
2016-03-07 05:44 dregad Changeset attached => MantisBT master c596d45b
2016-03-07 05:44 dregad Changeset attached => MantisBT master f82565ae
2016-03-07 05:44 dregad Assigned To => dregad
2016-03-07 05:44 dregad Status new => resolved
2016-03-07 05:44 dregad Resolution open => fixed
2016-03-07 05:44 dregad Fixed in Version => 1.3.0-rc.2
2016-03-07 05:45 dregad Assigned To dregad => cproensa
2016-03-07 05:45 dregad Target Version => 1.3.0-rc.2
2016-06-12 00:42 vboctor Status resolved => closed