Details
-
Type: Improvement
-
Status: Won't Do
-
Priority: Minor
-
Resolution: Won't Do
-
Affects Version/s: 4.7.25
-
Fix Version/s: None
-
Component/s: CiviMail
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
Description
Motivation:
CiviCRM currently calculates estimated recipients by starting the process to get recipients for the mailing, counting the number of rows, and then ROLLingBACK the transaction. This does not seem to be an efficient approach. (see https://github.com/civicrm/civicrm-core/pull/11091#issuecomment-340027758)
The code is here, among other places: https://github.com/JMAConsulting/civicrm-core/blob/8ccb593a5f5fd57fe2bfcc7923d265fbcd2af32b/ang/crmMailing/services.js#L291-L304
Solution:
Test/discuss to see what works best! An advantage of the current solution is, since it uses the 'live' recipient creation code, there is very little additional overhead.
If, as part of the refactoring, we can move getRecipients into the 'Recipients.php' file then so much the better?
Attachments
Issue Links
- duplicates
-
CRM-21316 Refactor getRecipients fn by creating a new fn getMailRecipients, that will be used ONLY to fetch and store mail recipients
- Done/Fixed