2016-12-07 19:07 EST

View Issue Details Jump to Notes ] Wiki ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0015411mantisbtperformancepublic2014-09-23 18:05
Assigned Todregad 
Product Version1.2.13 
Target Version1.2.14Fixed in Version1.2.14 
Summary0015411: Huge memory consumption for print_user_option_list()
DescriptionFollowing the implementation of the fix for 0010130, calling this function when the current project is ALL_PROJECTS causes a massive surge in memory usage, due to repeated calls to array_merge() as the code builds a very large array containing the list of all users in all projects accessible to the current user, and then reduces it to remove duplicates.

The code must be optimized to reduce memory consumption.
Additional InformationWith about 21'000 records in the user table, the memory footprint of calling this function for all projects is as follows:

- in 1.2.12: ~150M
- in 1.2.13: ~650M (!)
TagsNo tags attached.
Attached Files

related to 0010130closeddregad Filter "Assigned to" does not display usernames when project "All Projects" is selected 
related to 0015721closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0015347closeddregad Bad performance and memory issue with print_user_option_list 
related to 0012677acknowledged Please change a search option to manage users 
related to 0017490closeddregad Click Manage Configuration produces blank page 



dregad (developer)

With the attached commit, memory usage is reduced to approx 180M.

I don't see how it can be further reduced. As mentioned on the mailing list [1], I believe that in the future we should refactor the way we deal with user
selection lists, maybe by switching to an ajax-based user entry text field
with autocomplete, along the lines of what was proposed by Daryn in 0012677.

[1] http://thread.gmane.org/gmane.comp.bug-tracking.mantis.devel/4230/focus=4245


grangeway (reporter)

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-01-22 20:14 dregad New Issue
2013-01-22 20:14 dregad Status new => assigned
2013-01-22 20:14 dregad Assigned To => dregad
2013-01-22 20:15 dregad Relationship added related to 0010130
2013-01-22 20:38 dregad Changeset attached => MantisBT master-1.2.x e61e63ca
2013-01-22 20:38 dregad Status assigned => resolved
2013-01-22 20:38 dregad Resolution open => fixed
2013-01-22 20:38 dregad Fixed in Version => 1.2.14
2013-01-22 20:41 dregad Relationship added has duplicate 0015347
2013-01-24 03:03 dregad Changeset attached => MantisBT master f977b3ca
2013-01-24 03:25 dregad Note Added: 0034884
2013-01-24 03:35 dregad Relationship added related to 0012677
2013-01-29 09:25 dregad Status resolved => closed
2013-04-05 17:56 grangeway Status closed => acknowledged
2013-04-05 17:56 grangeway Note Added: 0036103
2013-04-05 19:34 grangeway Relationship added related to 0015721
2013-04-06 03:38 dregad Status acknowledged => closed
2013-04-06 07:23 grangeway Status closed => acknowledged
2013-04-06 09:22 dregad Tag Attached: 2.0.x check
2013-04-06 09:23 dregad Status acknowledged => closed
2014-07-07 08:15 dregad Relationship added related to 0017490
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
+Issue History