View Issue Details

IDProjectCategoryView StatusLast Update
0028120mantisbtperformancepublic2021-04-04 19:36
Reporterdregad Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.25.0 
Target Version2.26.0Fixed in Version2.26.0 
Summary0028120: Improve performance of user_pref_clear_invalid_project_default()
Description

This function can potentially work with a large number of records, if the project being processed has been set as default by many users.

To reduce the overhead, we should cache the user rows, before checking for access level, this way we execute a single DB query instead of one per user.

TagsNo tags attached.

Relationships

related to 0027144 closeddregad Data integrity: ensure users' default_project preference is a valid project 

Activities

Related Changesets

MantisBT: master f380b964

2021-03-25 19:30:38

dregad

Details Diff
Cache user data when clearing invalid project defaults

user_pref_clear_invalid_project_default() can potentially work with a
large number of records, if the project being processed has been set as
default by many users.

Caching all user rows early reduces the overhead, as we execute a single
DB query instead of one per user.

Fixes 0028120
Affected Issues
0028120
mod - core/user_pref_api.php Diff File