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

Memoize defaults computed for Convertibles #8451

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

ashmaroli
Copy link
Member

  • This is an optimization change.

Summary

Classes that mixin the Jekyll::Convertible module (primarily Jekyll::Page) doesn't have their to_liquid method memoized.
Therefore, every call to the #to_liquid method (esp. via the Liquid Filters where, find, sort) has their default front matter (which never changes for a given site.config hash) freshly computed.

@ashmaroli ashmaroli added the micro-optimization Matters only if it is a very large site ¯\_(ツ)_/¯ label Nov 1, 2020
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.

No noticeable change on a small website with defaults.

@ashmaroli
Copy link
Member Author

Thanks @DirtyF
@jekyllbot: merge +fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix frozen-due-to-age micro-optimization Matters only if it is a very large site ¯\_(ツ)_/¯
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants