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

MINOR: faster checking if record exists #10763

Merged
merged 1 commit into from
May 5, 2023

Conversation

sunnysideup
Copy link
Contributor

Rather than using a loop through each object, we just filter for it in the SQL query. This is likely to speed up the code and also make it more legible.

Rather than using a loop through each object, we just filter for it in the SQL query.  This is likely to speed up the code and also make it more legible.
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

This is a great improvement, thanks!
Works well locally.

@GuySartorelli GuySartorelli merged commit 1c2e1f8 into silverstripe:5 May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants