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

Use sys.platform instead of platform.system() #1467

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

cvijdea-bd
Copy link
Contributor

platform.system() is notoriously slow on Windows: python/cpython#95531

This change shaves >100ms off the runtime for python -c "import pika" on my machine.

lukebakken
lukebakken previously approved these changes Jun 9, 2024
Copy link
Member

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

@cvijdea-bd if you have a second, please double-check the changes I made. Thank you for your contribution. PS it's nice to run into someone else who uses Windows 👍

@cvijdea-bd
Copy link
Contributor Author

Seems good!

`platform.system()` is notoriously slow on Windows: python/cpython#95531
@lukebakken lukebakken merged commit ce7226e into pika:main Jun 10, 2024
14 checks passed
@cvijdea-bd cvijdea-bd deleted the sys-platform branch June 10, 2024 12:58
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.

2 participants