View Issue Details

IDProjectCategoryView StatusLast Update
0020138mantisbtperformancepublic2016-11-27 00:45
ReportercproensaAssigned 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 18:14:12

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
mod - core/file_api.php Diff File
mod - core/filter_api.php Diff File

MantisBT: master-1.3.x c851b37b

2016-11-12 05:56:57

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.
mod - my_view_inc.php Diff File

Issue History

Date Modified Username Field Change
2015-09-25 15:13 cproensa New Issue
2015-09-25 18:29 cproensa Note Added: 0051537
2015-11-04 14:34 cproensa Note Added: 0051816
2016-11-11 10:24 dregad Changeset attached => MantisBT master-1.3.x 624982be
2016-11-11 10:24 dregad Assigned To => dregad
2016-11-11 10:24 dregad Status new => resolved
2016-11-11 10:24 dregad Resolution open => fixed
2016-11-11 10:24 dregad Fixed in Version => 1.3.4
2016-11-11 10:26 dregad Assigned To dregad => cproensa
2016-11-11 10:26 dregad Target Version => 1.3.4
2016-11-15 11:32 dregad Relationship added related to 0021884
2016-11-26 04:42 dregad Changeset attached => MantisBT master-1.3.x c851b37b
2016-11-27 00:45 vboctor Status resolved => closed