-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Stash frequently used Drop setter keys for reuse #8394
Stash frequently used Drop setter keys for reuse #8394
Conversation
Third Party Repo Profile Summary--- master
+++ PR
- Total allocated: 282.43 MB (2467827 objects)
+ Total allocated: 280.79 MB (2426843 objects)
Total retained: 37.81 MB (112069 objects) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No gain on the build time?
No. Because we're replacing String interpolation with a Hash lookup. The notable gain here is reduced allocations in a large site with numerous pages and documents especially because |
What is a large site? I thought the one was big enough to reflect gain. |
A site with numerous pages and documents (and excerpts)
Yes. The third-party site is large enough. |
@jekyllbot: merge +fix |
Summary
Jekyll::Render
is initialized for every page or document rendered in a site and invariably callsJekyll::Drops::Drop#[]=
with a series of keys via its#run
method:jekyll/lib/jekyll/renderer.rb
Lines 52 to 58 in 7e0f907
jekyll/lib/jekyll/renderer.rb
Lines 214 to 217 in 7e0f907
jekyll/lib/jekyll/renderer.rb
Lines 229 to 232 in 7e0f907
jekyll/lib/jekyll/renderer.rb
Lines 234 to 237 in 7e0f907
jekyll/lib/jekyll/renderer.rb
Lines 190 to 192 in 7e0f907
The constant is currently private so that it can be replaced with a class-scoped cache in a future version if needed.