Skip to content

Use count() instead of len() where possible.#4760

Merged
wes-otf merged 1 commit intomainfrom
fix/len_where_count_works
Mar 18, 2026
Merged

Use count() instead of len() where possible.#4760
wes-otf merged 1 commit intomainfrom
fix/len_where_count_works

Conversation

@frjo
Copy link
Member

@frjo frjo commented Mar 17, 2026

Improves performance a bit by using .count() directly instead of loading everything and then use len() on it. SQL is always faster than PHP.

@frjo frjo added Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Patch Mini change, used in release drafter labels Mar 17, 2026
@wes-otf wes-otf merged commit 9cc718b into main Mar 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants