View Issue Details

IDProjectCategoryView StatusLast Update
0032244mantisbtperformancepublic2023-10-31 16:32
Reportervboctor Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilitysometimes
Status closedResolutionfixed 
Product Version2.25.5 
Target Version2.26.0Fixed in Version2.26.0 
Summary0032244: Issue view page timeouts or inefficient for issues with large number of notes and attachments
Description

For an example issue with 115 notes with 10 attachments

Current

  • Unique queries executed: 55
  • Total queries executed: 177
  • Total query execution time: 0.08 seconds

After optimization

  • Unique queries executed: 55
  • Total queries executed: 60
  • Total query execution time: 0.0242 seconds

70% improvement in performance

The redundant queries were generated by bug_get_attachments(). The solution is to add caches to this API.

TagsNo tags attached.

Relationships

has duplicate 0031189 closedatrol view.php slows down quadratically with number of files 

Activities

vboctor

vboctor

2023-03-25 19:04

manager   ~0067570

Here are the numbers after optimizing an unnecessary query for bug_id from bugnote_id.

DB Unique queries executed: 46
DB Total queries executed: 51
DB Total query execution time: 0.0235 seconds

vboctor

vboctor

2023-03-25 19:09

manager   ~0067571

PR: https://github.com/mantisbt/mantisbt/pull/1874

Related Changesets

MantisBT: master bbedece6

2023-03-25 18:59

vboctor


Details Diff
Fix performance with viewing large issues

Fixes 0032244
Affected Issues
0032244
mod - core/bug_api.php Diff File

MantisBT: master 25c908d5

2023-03-25 19:04

vboctor


Details Diff
Remove unnecessary queries

No need to query issue id from issue note id, since we already have it.

Fixes 0032244
Affected Issues
0032244
mod - core/file_api.php Diff File