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

fix: move expensive TimezoneFinder call out of top level. #4034

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdangerx
Copy link
Member

Overview

Just noticed this while chatting about our import time with @cmgosnell.

What problem does this address?

import pudl takes many seconds (like 5-10). Most of this comes from various different libraries we use (sklearn, pandas, dagster, mlflow, etc.) but 0.3 comes from importing pudl.transform.eia.

What did you change?

Moved the instantiation of a timezonefinder.TimezoneFinder closer to its call site - this won't get called for each row, which is good, and it also won't get called at import time, which is also good.

Documentation

Make sure to update relevant aspects of the documentation.

Tasks

Preview Give feedback

Testing

How did you make sure this worked? How can a reviewer verify this?

haven't yet!

To-do list

Preview Give feedback

@jdangerx jdangerx self-assigned this Jan 28, 2025
@zaneselvans
Copy link
Member

Huh, looks like this broke something in the auto-generated API docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants