Skip to content

Mem perf recipe csv validators#6467

Merged
jkschneider merged 2 commits intomainfrom
mem-perf-recipe-csv-validators
Dec 26, 2025
Merged

Mem perf recipe csv validators#6467
jkschneider merged 2 commits intomainfrom
mem-perf-recipe-csv-validators

Conversation

@jkschneider
Copy link
Copy Markdown
Member

What's changed?

In RecipeMarketplaceContentValidator.java, the helper methods validateDisplayName and validateDescription were incorrectly taking the accumulated validation as a parameter:

// BEFORE (buggy)
validation = validation.and(validateDisplayName(validation, displayName, value));
                    ^^^^^^^^^^
                    passed in and chained inside

Inside validateDisplayName, it chained errors onto the passed-in validation, then returned it. The caller then chained again with .and(result), creating a tree structure like:

Both(validation, Both(validation, Invalid))

Each iteration roughly doubled the tree size → O(2^N) memory with N recipes.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Dec 26, 2025
@jkschneider jkschneider merged commit ed31d6e into main Dec 26, 2025
2 checks passed
@jkschneider jkschneider deleted the mem-perf-recipe-csv-validators branch December 26, 2025 16:07
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant