View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018016 | mantisbt | performance | public | 2015-01-14 08:50 | 2016-06-12 00:42 |
Reporter | jhelf | Assigned To | cproensa | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.18 | ||||
Target Version | 1.3.0-rc.2 | Fixed in Version | 1.3.0-rc.2 | ||
Summary | 0018016: Decreasing performance when loading bug view with many notes | ||||
Description | When being logged in with an administrator user and repeatedly loading a bug with many notes the response times get perceivably worse over time. This is probably related to issue 0013680 and already explained by note 0013680:0031981 but there seems to be no overall fix. | ||||
Steps To Reproduce | Initial situation: I installed the stable 1.2.18 release with an existing database. Upgrade procedure was performed as documented. I don't think its an issue with the current release though, seems to be a general problem. Way to reproduce:
| ||||
Additional Information | The note buttons are rendered by the function print_button. print_button calls form_security_field which calls form_security_token where security tokens are generated and stored into the session. In bugnote_view_inc.php print_button is called without a $p_security_token argument which forces a new token to be generated by every call to print_button. Every single token is stored into the session. The session grows and grows with every call to print_button and the (de)serialization CPU drain increases proportional. Login/Logout "cures" the Problem because a new session is generated. | ||||
Tags | No tags attached. | ||||
Many thanks for the bug report and the detailed analysis. I'll investigate as time allows and see if a similar fix can be applied to bug view page. |
|
Can confirm Proposed PR: https://github.com/mantisbt/mantisbt/pull/656 |
|
I can confirm the same for issues with more than 300 notes (610 is the biggest). @cproensa 's PR 656 is just greate (cherry-picked the first 3 commits). [EDIT dregad] removed # in front of PR number |
|
MantisBT: master 63329426 2015-09-26 16:04 Committer: dregad Details Diff |
Pre-generate form security tokens Avoid performance issues in bug view page Fixes 0018016 |
Affected Issues 0018016 |
|
mod - bugnote_view_inc.php | Diff File | ||
MantisBT: master f3555c30 2015-09-27 11:03 Committer: dregad Details Diff |
Create tokens for action buttons only if needed Issue 0018016 |
Affected Issues 0018016 |
|
mod - bugnote_view_inc.php | Diff File | ||
MantisBT: master 9e532d6b 2016-03-06 12:45 Committer: dregad Details Diff |
Dont use serialization for Session variables There is no need to serialize data inserted in $_SESSION, as php does it at the end of script This is a performance hit when a session key is used multiple times (eg: 'form_security_tokens') Additionally, we use a new identifier for the session key (by adding a version number to it). Since we changed the format of the stored data, this will ignore older session data to avoid errors for users having active sessions during the transition. Fixes 0020142, 0018016 Signed-off-by: Damien Regad <dregad@mantisbt.org> Squashed original commits and reworded commit message |
Affected Issues 0018016, 0020142 |
|
mod - core/session_api.php | Diff File |