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

Implement a cache for cpu_info #350

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Conversation

FrancescAlted
Copy link
Member

@FrancescAlted FrancescAlted commented Dec 12, 2024

Fixes #349

This provides a fix for #349


For more details, open the Copilot Workspace session.

@FrancescAlted
Copy link
Member Author

This seems to work, and import time has been reduced from 1.6s to 0.3s on my box:

faltet@Mac-mini-de-Francesc ~/b/python-blosc2 (FrancescAlted/cpu-info-cache)> rm $HOME/.blosc2-cpuinfo.json                                        > time python -c"import blosc2"

________________________________________________________
Executed in    1.59 secs      fish           external
   usr time  810.65 millis    0.23 millis  810.42 millis
   sys time  325.02 millis    1.40 millis  323.62 millis

> time python -c"import blosc2"

________________________________________________________
Executed in  306.25 millis    fish           external
   usr time  235.43 millis    0.20 millis  235.23 millis
   sys time   67.69 millis    1.35 millis   66.34 millis

@FrancescAlted FrancescAlted merged commit 5180fd6 into main Dec 12, 2024
10 checks passed
@FrancescAlted FrancescAlted deleted the FrancescAlted/cpu-info-cache branch December 12, 2024 11:44
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.

Implement a cache for cpu_info
1 participant