Details
-
Type:
Improvement
-
Status: Done/Fixed
-
Priority:
Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.4
-
Fix Version/s: 4.1.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
I am seeing performance issues on profiles associated with this function due to a lack of caching
$addressOptions = CRM_Core_BAO_Preferences::valueOptions( 'address_options' );
in particular in profiles - on pages where buildProfile is called several times it's adding seconds to the page load
I found 12 places where it is being called from but I suspect the instance in CRM_UF_Form_Field -line 263 is the one that's causing performance issues on mulit-line profiles
valueOptions calls CRM_Core_OptionGroup::values which is called 104 times across the code base & has no caching. Many of thes (e.g. CRM_Pledge_Form_Pledge line 861 could be replaced by calls to cached constants but I suspect it would be easier to add caching to the values function)