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

Reduce allocation from normalize_whitespace filter #8400

Merged

Conversation

ashmaroli
Copy link
Member

  • This is a 🔨 code refactoring.

Summary

Chaining multiple non-mutating methods result in unnecessary duplication.
The solution is to duplicate input once and mutate the result thereafter.

@ashmaroli ashmaroli added the memory-optimization ⚡ Reduced memory usage for the work done label Sep 18, 2020
@ashmaroli ashmaroli added this to the 4.2 milestone Sep 25, 2020
@ashmaroli ashmaroli requested a review from DirtyF October 1, 2020 11:53
Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashmaroli
Copy link
Member Author

Thanks.
@jekyllbot: merge +fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix frozen-due-to-age memory-optimization ⚡ Reduced memory usage for the work done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants