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

Optimize validation event aggregation #595

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

mtdowling
Copy link
Member

When validating massive models, this line was causing out of memory
errors because it required keeping two copies of a validation events in
memory at once (one to aggregate and then one to copy into the result).
This change instead just uses a single list to aggregate the result, and
then mutates that list to add in any other events encountered while
building up validators.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

When validating massive models, this line was causing out of memory
errors because it required keeping two copies of a validation events in
memory at once (one to aggregate and then one to copy into the result).
This change instead just uses a single list to aggregate the result, and
then mutates that list to add in any other events encountered while
building up validators.
@mtdowling mtdowling requested a review from srchase October 7, 2020 15:40
@mtdowling mtdowling merged commit b6fcd89 into master Oct 7, 2020
@mtdowling mtdowling deleted the optimize-validation-event-aggregation branch December 11, 2020 17:59
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