-
Notifications
You must be signed in to change notification settings - Fork 7
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
Defer openpyxl import #62
Conversation
febc346
to
198e2dd
Compare
pytest.ini
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Should this be addressed/discussed in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to split it off into its own pr if it's clearer/easier to discuss, but I figured this was a small enough pr and I wanted to get the main branch fixed quickly. I briefly looked into the yak shave of making the pytz->zoneinfo change, but it's a bit larger than I wanted to bite off for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joetsoi
f0021d1
to
fbbed26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy for the changes to be merged after a rebase.
🚢
pytest.ini
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joetsoi
See https://adamj.eu/tech/2023/03/02/django-profile-and-improve-import-time/#defer-imports openpyxl takes ~0.2 seconds to import. This is included in every pytest run whether convert_xlsx_to_csv is used or not.
fbbed26
to
f8cfcbe
Compare
Easy win stolen wholesale from this Wednesday's django london talk
See https://adamj.eu/tech/2023/03/02/django-profile-and-improve-import-time/#defer-imports
openpyxl takes ~0.2 seconds to import. This is included in every pytest run whether convert_xlsx_to_csv is used or not.
This also fixes the main branch which is broken since the release of django 4.2 by silencing the pytz usage issues. Maybe another spaday task!