View Issue Details

IDProjectCategoryView StatusLast Update
0020138mantisbtperformancepublic2016-11-27 00:45
Reportercproensa Assigned Tocproensa  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.3 
Target Version1.3.4Fixed in Version1.3.4 
Summary0020138: file_bug_attachment_count fetch data for all bugs
Description

In "file_api.php"
function file_bug_attachment_count

is called to get attachment count, for example from view_all_bug_page

sql query performed:
SELECT bug_id, COUNT(bug_id) AS attachments FROM mantis_bug_file_table GROUP BY bug_id

According to function comments, it builds a cached variable $g_cache_file_count, to avoid additional db queries

Still, the cache is loaded with data from ALL bugs, whis actually is not needed.

in my system, for example, it loads >46000 entries, when no more than ~50 are needed (those bugs that are to be showed in the page).
This uses uneeded memory and processing.

TagsNo tags attached.

Relationships

related to 0021884 closedcproensa Use meaningful names for bugnote cache global variables 

Activities

cproensa

cproensa

2015-09-25 18:29

developer   ~0051537

proposed PR: https://github.com/mantisbt/mantisbt/pull/654

cproensa

cproensa

2015-11-04 14:34

developer   ~0051816

please dont forget to have a look at this.
this is a major performance hit for big trackers

Related Changesets

MantisBT: master-1.3.x 624982be

2015-09-25 14:14

cproensa

Committer: dregad


Details Diff
Use selective bug cache for attachment count

Fetch data only for bugs included in filter result set
instead of reading the full table and storing it in cache

fixes 0020138
Affected Issues
0020138
mod - core/file_api.php Diff File
mod - core/filter_api.php Diff File

MantisBT: master-1.3.x c851b37b

2016-11-12 00:56

cproensa

Committer: dregad


Details Diff
Cache attachment count in my view page

After refactoring the bug attachment count cache:
(see 624982beb1091fb869edd50bb3c64eafe2a8db6a, issue 0020138).

My-view page needs to call explicitly to bug_cache_columns_data() with
the fetched bugs.
Affected Issues
0020138
mod - my_view_inc.php Diff File