Skip to content

Stash attribute hash for Liquid computed for pages#8497

Merged
jekyllbot merged 3 commits intojekyll:masterfrom
ashmaroli:stash-page-attribute-hash
Dec 10, 2020
Merged

Stash attribute hash for Liquid computed for pages#8497
jekyllbot merged 3 commits intojekyll:masterfrom
ashmaroli:stash-page-attribute-hash

Conversation

@ashmaroli
Copy link
Copy Markdown
Member

  • This is an ⚡ optimization change.

Summary

Since Jekyll::Page#to_liquid isn't memoized, the attribute hash for Liquid gets computed on every call.
Therefore compute the attribute hash on first call and stash it for consequent reuse.

@ashmaroli ashmaroli added the memory-optimization ⚡ Reduced memory usage for the work done label Dec 4, 2020
@ashmaroli ashmaroli requested a review from DirtyF December 10, 2020 12:27
Copy link
Copy Markdown
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.

💾

@ashmaroli
Copy link
Copy Markdown
Member Author

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit 01825f5 into jekyll:master Dec 10, 2020
@ashmaroli ashmaroli removed the bug label Dec 10, 2020
jekyllbot added a commit that referenced this pull request Dec 10, 2020
@ashmaroli ashmaroli deleted the stash-page-attribute-hash branch December 10, 2020 14:00
github-actions bot pushed a commit that referenced this pull request Dec 10, 2020
Ashwin Maroli: Stash attribute hash for Liquid computed for pages (#8497)

Merge pull request 8497
github-actions bot pushed a commit to tigefa4u/jekyll that referenced this pull request Dec 10, 2020
jekyllbot: Update history to reflect merge of jekyll#8497 [ci skip]
ashmaroli added a commit to ashmaroli/jekyll that referenced this pull request Aug 25, 2021
@jekyll jekyll locked and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

3 participants