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

nilsbeck/improve-duration-matrix-performance #72

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

nilsbeck
Copy link
Collaborator

Description

Removes slow json marshalling to improve performance when reading duration matrix data.

Copy link
Member

@merschformann merschformann left a 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! 🤗

}
result = append(result, matrix)
} else {
return nil, fmt.Errorf("invalid time-dependent matrix format")
Copy link
Member

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 😅 ).

return validateTimeDependentMatricesAndIDs(input, timeDependentMatrices, modelOptions)
}

// Converts a single or multiple time-dependent matrices from a slice of interfaces to []schema.TimeDependentMatrix.
Copy link
Member

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?

@nilsbeck nilsbeck merged commit 1be23b1 into develop Oct 24, 2024
33 checks passed
@nilsbeck nilsbeck deleted the nilsbeck/improve-duration-matrix-performance branch October 24, 2024 14:02
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