Details
-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.7.6
-
Fix Version/s: Unscheduled
-
Component/s: CiviReport
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
We are trying to export to CSV from the Mailing Details report, but encountering constant timeouts.
The biggest time-wasters are actually in preparing the data for display - particularly the alterCustomDataDisplay() method in CRM_Report_Form.
This calls CRM_Core_BAO_CustomField::displayValue() for each custom field value. So if you have a report with 100,000 rows, and 5 custom fields, that's 500,000 calls.
Depending on the custom field, the 'display value' is actually no different from the normal value, so in a couple of reports we've just been able to comment out the function without any detrimental effect.
This needs a bit more investigation, but there must be a way to streamline the alterCustomDataDisplay() method - either by joining on to the right value in the first place, or by caching the data...