Skip to content

perf(issues): Use generator instead of list comp in handle_merge any()#114644

Open
mrduncan wants to merge 1 commit intomasterfrom
mrduncan/ref/use-generator-in-merge-any
Open

perf(issues): Use generator instead of list comp in handle_merge any()#114644
mrduncan wants to merge 1 commit intomasterfrom
mrduncan/ref/use-generator-in-merge-any

Conversation

@mrduncan
Copy link
Copy Markdown
Member

@mrduncan mrduncan commented May 1, 2026

any() can short-circuit on the first match, but wrapping the comprehension in brackets builds the entire list before any() runs. Drop the brackets to let any() iterate lazily.

any() can short-circuit on the first match, but wrapping the comprehension in brackets builds the entire list before any() runs. Drop the brackets to let any() iterate lazily.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 1, 2026
@mrduncan mrduncan marked this pull request as ready for review May 1, 2026 23:25
@mrduncan mrduncan requested a review from a team as a code owner May 1, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants