View Issue Details

IDProjectCategoryView StatusLast Update
0020242mantisbtperformancepublic2016-06-12 00:42
Reportercproensa Assigned 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 10:24

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
Affected Issues
0020242
mod - manage_proj_edit_page.php Diff File

MantisBT: master c596d45b

2015-11-04 11:39

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
Affected Issues
0020242
mod - manage_proj_edit_page.php Diff File

MantisBT: master f82565ae

2015-11-04 11:52

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
Affected Issues
0020242
mod - manage_proj_edit_page.php Diff File