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

Optimize computing filename in LiquidRenderer #6841

Merged
merged 1 commit into from Apr 12, 2018

Conversation

Projects
None yet
5 participants
@ashmaroli
Member

ashmaroli commented Mar 11, 2018

I should've made these corrections before #6610 got merged..
Oh well.."Better late than never.."

@ashmaroli ashmaroli added this to the v3.8.0 milestone Mar 11, 2018

@ashmaroli ashmaroli requested a review from oe Mar 11, 2018

@oe

oe approved these changes Mar 11, 2018

@@ -53,7 +53,7 @@ def self.format_error(e, path)
private
def filename_regex
%r!\A(#{source_dir}/|#{theme_dir}/|\W*)(.*)!oi
@filename_regex ||= %r!\A(#{source_dir}/|#{theme_dir}/|\W*)(.*)!i

This comment has been minimized.

@Crunch09

Crunch09 Mar 11, 2018

Member

Just curious: Why did you get rid of the o modifier?

This comment has been minimized.

@ashmaroli

ashmaroli Mar 11, 2018

Member

The o modifier stands for "interpolate once" which I feel is *unnecessary" when the regex itself is going to be created once per Site instance since the entire method has now been memoized..

def_delegator :@site, :in_source_dir, :source_dir
def_delegator :@site, :in_theme_dir, :theme_dir
private def_delegator :@site, :in_source_dir, :source_dir
private def_delegator :@site, :in_theme_dir, :theme_dir

This comment has been minimized.

@pathawks

pathawks Apr 12, 2018

Member

I recognize that these were always meant to be private, but at this point would it be easier to punt this until v4.0.0? Or is this necessary for this PR?

This comment has been minimized.

@ashmaroli

ashmaroli Apr 12, 2018

Member

These attributes have not been released yet.. I added them in #6610..
So they can be safely altered..

This comment has been minimized.

@ashmaroli

ashmaroli Apr 12, 2018

Member

(this is therefore just a fix as well..)

@pathawks

This comment has been minimized.

Member

pathawks commented Apr 12, 2018

@jekyllbot: :shipit: +minor

@jekyllbot jekyllbot merged commit 8f78afe into jekyll:master Apr 12, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ashmaroli ashmaroli deleted the ashmaroli:profile-filename-regex branch Apr 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment