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

Utilize flexibility of Site#in_dest_dir #8403

Merged
merged 2 commits into from
Oct 1, 2020

Conversation

ashmaroli
Copy link
Member

  • This is a 🔨 code refactoring change.

Summary

Site#in_dest_dir is a flexible method that joins multiple arguments into an absolute path:

jekyll/lib/jekyll/site.rb

Lines 411 to 415 in f8c7208

def in_dest_dir(*paths)
paths.reduce(dest) do |base, path|
Jekyll.sanitized_path(base, path)
end
end

Therefore, it is unnecessary to generate paths beforehand.

@ashmaroli ashmaroli added fix optimization ⚡ memory-optimization ⚡ Reduced memory usage for the work done labels Sep 20, 2020
@ashmaroli ashmaroli added this to the 4.2 milestone Sep 25, 2020
@ashmaroli ashmaroli requested a review from DirtyF October 1, 2020 11:52
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.

Looks good,
Jekyll website builds in 4.4s instead of 5.6s on master.

@ashmaroli
Copy link
Member Author

Thanks.
@jekyllbot: merge +fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants