-
Notifications
You must be signed in to change notification settings - Fork 53
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(MobilityDataValidation): slow on large gtfs files #525
Conversation
// TODO: base this on the file being completely saved rather than a fixed amount of time. | ||
Thread.sleep(5000); | ||
// 5 seconds + ~1 second per 10mb | ||
Thread.sleep(5000 + (this.fileSize / 10000)); |
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.
What unit is this.fileSize
? According to the code, it is set with [newGtfs]File.length()
which is in bytes.
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'm not sure, but this does fix things
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.
@miles-grant-ibigroup Can you fix the comment so it corresponds to the code?
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.
Did I get the decimal math right in 0ebf222?
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'm sorry, the initial comment was correct, juggling with the units was confusing (10,000,000 / 10,000 = 1000).
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.
It was indeed 1 sec / 10 MB...
This reverts commit 0ebf222.
Not sure why it says closed instead of merged... |
Checklist
dev
before they can be merged tomaster
)Description
The MobilityData validator takes a while between finishing and saving results. There is no way to check when this process completes using their api. The solution is to do a wait, currently 5 seconds. However, on large feeds this is not enough. The solution is to adjust the wait depending on file size.
Closes #524
Looking to try this fix on as wide a variety of systems as possible to make sure the values are correct