-
Notifications
You must be signed in to change notification settings - Fork 5
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
nilsbeck/improve-duration-matrix-performance #72
nilsbeck/improve-duration-matrix-performance #72
Conversation
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.
Just a small recommendation. Thanks for the work! 🤗
factory/validate.go
Outdated
} | ||
result = append(result, matrix) | ||
} else { | ||
return nil, fmt.Errorf("invalid time-dependent matrix format") |
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.
Let's be a bit more specific here and add the index of the failing entry (just in case someone ever messes up a different entry than the first one 😅 ).
factory/validate.go
Outdated
return validateTimeDependentMatricesAndIDs(input, timeDependentMatrices, modelOptions) | ||
} | ||
|
||
// Converts a single or multiple time-dependent matrices from a slice of interfaces to []schema.TimeDependentMatrix. |
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.
Can it really deal with a single
time-dependent matrix? Or, does that only refer to the slice containing one?
Description
Removes slow json marshalling to improve performance when reading duration matrix data.