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

Check if username and size matches a pattern once #48

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

ashmaroli
Copy link
Member

  • Reduce MatchData allocations by matching in just the :initialize method and stash the result in instance_variables which is then used during the :render calls.
  • Reduce Array allocations by adding a check to the :lookup_variable method from Jekyll::LiquidExtensions. (Adding the check in Jekyll would limit its availability to just v4.1 and beyond. So optimize here directly.)

@ashmaroli ashmaroli merged commit e71b352 into jekyll:master Feb 26, 2020
@ashmaroli ashmaroli deleted the reduce-matchdata-allocations branch February 26, 2020 06:20
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