Skip to content

xmlrpc: don't call xmlrpc methods twice! #17712

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

Merged
merged 1 commit into from
Mar 5, 2025
Merged

Conversation

ewdurbin
Copy link
Member

@ewdurbin ewdurbin commented Mar 5, 2025

While looking at pypa/bandersnatch#1897, I did some basic checking on XMLRPC performance and checked on opportunities for optimization of the remaining routes.

I noticed specifically for list_packages_with_serial we were running the rather expensive query + dictionary build twice.

Turns out it was a misunderstanding of pydantic's validate_call introduced in #14361. validate_call actually calls the thing, so we should just return that rather than throwing it away and running it again.

@ewdurbin ewdurbin requested a review from a team as a code owner March 5, 2025 10:34
@ewdurbin ewdurbin merged commit 06d4dc5 into main Mar 5, 2025
20 checks passed
@ewdurbin ewdurbin deleted the dont_double_call_xmlrpc branch March 5, 2025 10:42
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.

1 participant