Skip to content

Conversation

@jkschneider
Copy link
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.

2 participants