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

Avoid URL parsing when deserializing wheels #5235

Merged
merged 1 commit into from
Jul 20, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

This PR slots in UrlString for WheelWire, which IIUC should avoid parsing URLs during deserialization?

@charliermarsh charliermarsh added the performance Potential performance improvement label Jul 20, 2024
@charliermarsh charliermarsh marked this pull request as ready for review July 20, 2024 01:39
@charliermarsh
Copy link
Member Author

If we want, I see a path to skipping URL parsing entirely except for those distributions that we attempt to install / query.

@ibraheemdev
Copy link
Member

If we want, I see a path to skipping URL parsing entirely except for those distributions that we attempt to install / query.

This would just mean using UrlString in more places, right?

@charliermarsh
Copy link
Member Author

This would just mean using UrlString in more places, right?

I think we would change File::try_from to not parse at all and instead store the raw string (this could be UrlString, but we'd need to change UrlString so that it's not guaranteed to be a valid URL). Make UrlString::to_url a Result and add appropriate error handling.

@charliermarsh
Copy link
Member Author

I can give it a try at some point, but let me know if you beat me to it.

@charliermarsh charliermarsh merged commit 1243c5e into main Jul 20, 2024
54 checks passed
@charliermarsh charliermarsh deleted the charlie/workspace branch July 20, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Potential performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants