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

perf: Avoid importing ctypes.util in CPU check script if possible #16307

Merged
merged 1 commit into from
May 18, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented May 18, 2024

This fixes a regression in import times, as ctypes.util imports a lot of stuff we don't need.

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels May 18, 2024
Copy link

codecov bot commented May 18, 2024

Codecov Report

Attention: Patch coverage is 11.11111% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 80.76%. Comparing base (b61a5a9) to head (f78f688).

Files Patch % Lines
py-polars/polars/_cpu_check.py 11.11% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16307      +/-   ##
==========================================
- Coverage   80.76%   80.76%   -0.01%     
==========================================
  Files        1393     1393              
  Lines      179416   179423       +7     
  Branches     2921     2922       +1     
==========================================
- Hits       144910   144904       -6     
- Misses      34003    34016      +13     
  Partials      503      503              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@stinodego stinodego changed the title perf: avoid importing ctypes.util if possible perf: Avoid importing ctypes.util in CPU check script if possible May 18, 2024
@stinodego stinodego merged commit 1af9ccb into pola-rs:main May 18, 2024
16 checks passed
@c-peters c-peters added the accepted Ready for implementation label May 21, 2024
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants