On Email compose our users start entering an email address to search for a recipient.
As soon as the first letter is entered the search kicks off... and it takes FOREVER to find matches, it's untennable.
I have found two things:
- every search looks by first name, last name, full name and email address in EACH of the Users, Contacts, Leads, Prospects tables.
- close to each additional letter typed kicks off yet another query for the entered partial string.
Our users NEVER enter names, they alway enter full email addresses.
So I would like to cut the searching down by: not searching by all the variations on name, and not starting to search until the <Return> they is pressed.
I tried extending
modules/Emails/EmailRecipientsService.php
to restrict the ways it searches by commenting out a few terms:
if (!empty($term)) {
// $wheres['first_name'] = $term;
// $wheres['last_name'] = $term;
// $wheres['full_name'] = $term;
$wheres['email_address'] = $term;
Sadly appears that this can't be done in an upgrade safe manner (but MAN does it make a difference!)
But I still could not find a way to keep the queries from firing off before the user is done typing.
Any suggestions?
I would also get cake and cookies if I could sort the output by Contacts first, then Users, then Leads. :)
Thanks,
Francesca