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
Enforce Style/FrozenStringLiteralComment #6265
Conversation
ba4e048
to
e788ad5
Compare
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.
A couple comments, but I'm totally on board with this change 👍
docs/_docs/history.md
Outdated
@@ -27,7 +27,7 @@ note: This file is autogenerated. Edit /History.markdown instead. | |||
- add plugins for multiple page pagination ([#6055]({{ site.repository }}/issues/6055)) | |||
- Update minimum Ruby version in installation.md ([#6164]({{ site.repository }}/issues/6164)) | |||
- [docs] Add information about finding a collection in `site.collections` ([#6165]({{ site.repository }}/issues/6165)) | |||
- Add {%raw%} to Liquid example on site ([#6179]({{ site.repository }}/issues/6179)) | |||
- Add {% raw %}`{% raw %}`{% endraw %} to Liquid example on site ([#6179]({{ site.repository }}/issues/6179)) |
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.
This probably doesn't belong in this PR
?
exe/jekyll
Outdated
@@ -1,4 +1,6 @@ | |||
#!/usr/bin/env ruby | |||
# frozen_string_literal: true | |||
# |
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.
This should probably be an empty line
lib/jekyll/mime.types
Outdated
@@ -744,7 +759,7 @@ text/x-fortran f for | |||
text/x-handlebars-template hbs | |||
text/x-java-source java | |||
text/x-lua lua | |||
text/x-markdown markdown md mkd | |||
text/x-markdown mkd |
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.
Mime type stuff probably doesn't belong in this PR
?
The frozen_string_literal: true magic comment in Ruby can help dramatically decrease memory allocations for new strings and can thusly speed up your program. The intent here is for Jekyll to use less memory and make fewer memory allocations (which must later be GC'd).
e788ad5
to
4d1659c
Compare
Updated, thanks for the review @pathawks! @jekyllbot: merge +fix |
The frozen_string_literal: true magic comment in Ruby can help
dramatically decrease memory allocations for new strings and can thusly
speed up your program. The intent here is for Jekyll to use less memory
and make fewer memory allocations (which must later be GC'd).
Using the output of
GC.stats
fromscript/stackprof
:Before:
After:
With this patch, we allocate 4,276 fewer pages, and 1,743,399 fewer objects. Holy smokes! That's huge savings.
/cc @jekyll/stability