Skip to content
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

Replace expensive query with cheaper one #21426

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Sep 9, 2021

Overview

Replace expensive query with cheaper one

Before

call so apiQuery - retrieves all fields across several tables

After

Apiv4 field - retrieves 1 field

Technical Details

Rather than retrieve everything with a legacy function, just get what we want....

Note I commented on how silly I think it is but no change to outcome

Comments

@civibot
Copy link

civibot bot commented Sep 9, 2021

(Standard links)

@seamuslee001
Copy link
Contributor

well test failure is related @eileenmcnaughton

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 it passed in isolation - my guess is there is a 'spare' Anthony Anderson in the db :-) Will check

Rather than retrieve everything with a legacy function, just get what we want....

Note I commented on how silly I think it is but no change to outcome
// this based on 'the first email in the db that matches'.
// when we likely have the contact id. OTOH people probably barely
// use preferredMailFormat these days - the good fight against html
// emails was lost a decade ago...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would fully support ripping out 'preferred_mail_format'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmcclelland given you just put up a PR about importing this field I'm thinking you might still see value in it? I am a bit confused why we wouldn't always send 'BOTH' and let the mail client decide

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think sending in non-html ever took off. I'd be in favour of obsoleting then later removing this.

@jmcclelland
Copy link
Contributor

My recent pull request was on preferred_communication_method (e.g. Email vs SMS vs phone call), not preferred_mail_format. I agree that we should yank out preferred_mail_format and always send both text and html in each email messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants