Skip to content

Microoptimize reproof_for_irs to avoid database query#7307

Merged
aduth merged 1 commit intomainfrom
aduth-optimize-reproof-for-irs
Nov 8, 2022
Merged

Microoptimize reproof_for_irs to avoid database query#7307
aduth merged 1 commit intomainfrom
aduth-optimize-reproof-for-irs

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Nov 7, 2022

🛠 Summary of changes

Optimizes UserDecorator#reproof_for_irs? to avoid a database query by short-circuiting on a known value (service_provider) when possible. This avoids a database query for every non-IRS service provider.

Inspired by #7279, since we're now logging the value of reproof_for_irs? for every analytics event in identity verification.

changelog: Internal, Performance, Optimize to reduce database queries
@aduth aduth requested review from jmhooper and solipet November 7, 2022 20:32
Copy link
Contributor

@solipet solipet left a comment

Choose a reason for hiding this comment

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

W00t!

@aduth aduth merged commit 92c73f1 into main Nov 8, 2022
@aduth aduth deleted the aduth-optimize-reproof-for-irs branch November 8, 2022 13:08
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.

4 participants