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

[red-knot] Remove a parameter from the symbol_by_id() query #16138

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

AlexWaygood
Copy link
Member

Salsa queries are more performant when they have fewer parameters, so this might lead to a performance improvement

@AlexWaygood AlexWaygood added performance Potential performance improvement red-knot Multi-file analysis & type inference labels Feb 13, 2025
@AlexWaygood AlexWaygood force-pushed the alex/dunder-slots-arg branch from 2474d98 to d05c0e1 Compare February 13, 2025 13:24
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

I like this better even if it doesn't improve perf because it moves the computation closer to where it's needed and makes it more lazy. It should also remove the symbol_table dependency for the query calling symbol which is nice.

@AlexWaygood AlexWaygood marked this pull request as ready for review February 13, 2025 13:28
@AlexWaygood
Copy link
Member Author

no impact on perf :-( https://codspeed.io/astral-sh/ruff/branches/alex%2Fdunder-slots-arg

but yeah, as you say, a nice small change anyway :-)

@AlexWaygood AlexWaygood removed the performance Potential performance improvement label Feb 13, 2025
@AlexWaygood AlexWaygood merged commit be49151 into main Feb 13, 2025
21 checks passed
@AlexWaygood AlexWaygood deleted the alex/dunder-slots-arg branch February 13, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants