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

suggestions for faster busiest date calculation #9

Closed
wants to merge 1 commit into from

Conversation

markusstraub
Copy link
Contributor

I noticed that the method for calculating the busiest date for a takes quite a long time and had a look at it. For a real-world sized feed of mine the proposed changes reduced the time from 5 minutes to 2:40.

Tests still pass and comparing the extracted feeds from my test script also showed an empty diff.

@araichev
Copy link
Contributor

Thanks, @markusstraub .
I'll review this as soon as i get a chance.

@araichev
Copy link
Contributor

Hi @markusstraub , i finally got around to review this merge request.
I've taking your idea of using a set_index instead of a groupby, which should speed things up.
Precomputing weekday strings, doesn't look like it would speed things up, because you're still doing the same number of conversion calculations.
But try out the new release and let me know.

@markusstraub
Copy link
Contributor Author

Great, thanks for incorporating the change, hope it helps you and all other users :) (I'll test this the next time I have to fiddle with GTFS)

@araichev araichev closed this Sep 30, 2024
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