-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-21383 - Inclusion of a directive to replace the existing select f… #11267
Conversation
…ield for loading Message templates on demand in the CiviMail compose UI
Can one of the admins verify this patch? |
I had a brief conversation with you about this at the sprint in Bampton. I would appreciate your advice on a few small points which would help to improve this further.
|
Jenkins ok to test |
ang/crmMailing/Templates.js
Outdated
rcpAjaxState = { | ||
input: input, | ||
entity: 'civicrm_msg_templates', | ||
type: 'include', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably unneeded here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this was only needed for grouping the inclusion of recipients/mailing groups.
@nbrettell Nathan, good to see you following on with work here, can you fix the style problem found by the checker https://test.civicrm.org/job/CiviCRM-Core-PR/17981/checkstyleResult/new/ and on point 1 I don't think so, Re 2. not sure will need to test it out myself to see what can happen |
@nbrettell Have done some testing on the dev copy of the site we used for testing #11091 & #11142. I tested vanilla 4.7.27 vs 4.7.27 + this PR. Results Condition 1: Average UI load time:
Condition 2: Average UI load time:
Summary Excellent! That's a reduction of 85 seconds (69%) with 2706 mailing groups; a reduction of 55 seconds (73%) with 2706 mailing groups. As noted, I found quite a long delay before the template select2 field loaded, taking the full 38 seconds in condition 1 and 15s out of the total 20s in condition 2. As I noted at #11142, it's interesting that altering the number of mailing groups still makes a big difference to the load time, even with mailing groups loading on demand. Also of interest here is that the number of mailing groups affects how long it takes the new template select2 field to load. During this wait, no AJAX requests are in progress, server is idle, client using 100% CPU. So there's some client-side processing going on that is sensitive to the number of enabled mailing groups. Would be good to have @seamuslee001's thoughts on that. Really pleased with these results and I haven't come across any issues other than the delay in loading the select2 field. |
merging based on @davejenx review |
Sorry for being late in reviewing this PR. Great work @nbrettell :) |
I'm curious to know why the |
CRM-21383 - Inclusion of a directive to replace the existing select f…
@nbrettell @davejenx This seems to break wordpress as it can't load the file |
…ield for loading Message templates on demand in the CiviMail compose UI
Overview
This is to replace the current selection field for choosing a message template in the CiviMail compose UI screen, so that templates are loaded on demand rather than on the initial state.
Before
Please see @davejenx comment regarding performance issues #on the following pull request #11091 (comment)
After
Templates loaded on demand, with the ability to search for a specific template.
Technical Details
Removed the origin field for the choosing of templates, this has now been written as a AngularJS directive. Comments I believe how I have included the LoadMessage template function is incorrect, I don't like how I am having to use the grandparent scope, but I couldn't see how to avoid this. Overall, I have seen good performance improvements. However, I have also noticed a slight delay in loading the field on the latest master (seen in the above GIF).