View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015347 | mantisbt | performance | public | 2013-01-06 19:54 | 2013-02-01 18:53 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 1.2.13 | ||||
Summary | 0015347: Bad performance and memory issue with print_user_option_list | ||||
Description | While benchmarking performance for 0013680 with a test DB having about 20'000 records in mantis_user_table, I noticed that the adm_config_report.php page would not load at all (blank page). I was surprised to find no errors in PHP logs, but after a bit of research I traced it to the call to print_user_option_list() in the edit form at page bottom. When "All Projects" is selected, that function calls project_get_all_user_rows() several times (once for each project the current user has access to, which in fact generally means all projects since the user loading the page is most likely an administrator) The code in project_get_all_user_rows() does not efficiently handle this situation, because every time the function is called it
This not only results in heavy memory usage, but also causes bad performance as each execution of the function required about 1-2 second on my test system (with 16 projects), sometimes causing the page execution to abort (PHP Fatal error: Maximum execution time exceeded). This code should be optimized. | ||||
Tags | No tags attached. | ||||