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

Memoize absolute_url and relative_url filters #7793

Merged
merged 1 commit into from Aug 22, 2019

Conversation

benesch
Copy link
Contributor

@benesch benesch commented Aug 19, 2019

These two filters are quite slow, as Addressable::URI.parse is quite
slow. Fortunately, they are pure functions and so can be easily
memoized. This one change shaves 8s off the CockroachDB docs build
(github.com/cockroachdb/docs).

@DirtyF DirtyF requested a review from a team August 19, 2019 07:03
@DirtyF DirtyF added this to the 4.1 milestone Aug 19, 2019
@dstiers-1109
Copy link

Thanks

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.

Please fix rubocop offenses to make script/fmt pass. Thanks.

@benesch
Copy link
Contributor Author

benesch commented Aug 20, 2019

Whoops, done. Had to refactor a bit to get the AbcSize lint to quiet down.

These two filters are quite slow, as Addressable::URI.parse is quite
slow. Fortunately, they are pure functions and so can be easily
memoized. This one change shaves 8s off the CockroachDB docs build
(github.com/cockroachdb/docs).
@DirtyF
Copy link
Member

DirtyF commented Aug 22, 2019

Thanks @benesch 👍

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit 55fba8f into jekyll:master Aug 22, 2019
jekyllbot added a commit that referenced this pull request Aug 22, 2019
@DirtyF DirtyF added this to Reviewable in Jekyll 4.1 Aug 22, 2019
@DirtyF DirtyF moved this from Reviewable to Done in Jekyll 4.1 Aug 22, 2019
@jekyll jekyll locked and limited conversation to collaborators Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Jekyll 4.1
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants