Enforce Style/FrozenStringLiteralComment#6265
Merged
Conversation
ba4e048 to
e788ad5
Compare
pathawks
approved these changes
Aug 4, 2017
Member
pathawks
left a comment
There was a problem hiding this comment.
A couple comments, but I'm totally on board with this change 👍
docs/_docs/history.md
Outdated
| - 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)) |
Member
There was a problem hiding this comment.
This probably doesn't belong in this PR
?
exe/jekyll
Outdated
| @@ -1,4 +1,6 @@ | |||
| #!/usr/bin/env ruby | |||
| # frozen_string_literal: true | |||
| # | |||
Member
There was a problem hiding this comment.
This should probably be an empty line
lib/jekyll/mime.types
Outdated
| text/x-java-source java | ||
| text/x-lua lua | ||
| text/x-markdown markdown md mkd | ||
| text/x-markdown mkd |
Member
There was a problem hiding this comment.
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
Member
Author
|
Updated, thanks for the review @pathawks! @jekyllbot: merge +fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.statsfromscript/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