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

Reduce 71.6% of building time by using Jekyll 4.0.0 #123

Merged
merged 6 commits into from Jul 28, 2019

Conversation

@yasulab
Copy link
Member

commented Jul 28, 2019

🎉Reduced building time by 71.6%!

cf. 📜 How I reduced my Jekyll build time by 61% | Forestry.io
https://forestry.io/blog/how-i-reduced-my-jekyll-build-time-by-61/

NOTE: This PR is shared with Help us benchmark Jekyll in Jekyll Talk
https://talk.jekyllrb.com/t/help-us-benchmark-jekyll/1629/19?u=yasulab

TL;DR

  • Before this PR: 7.574 seconds
  • w/ Cache API: 3.649 seconds
  • w/ liquid-c gem: 2.581 seconds
  • w/ CommonMark: 2.152 seconds <- This breaks many pages; need to tweak to introduce.
  • w/ include-cache: 2.148 seconds

Before

Done in 7.574 seconds.
$ bundle exec jekyll build --profile

Configuration file: /Users/yasulab/yasslab.jp/_config.yml
            Source: ./
       Destination: ./_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts

Filename                                                          | Count |   Bytes |  Time
------------------------------------------------------------------+-------+---------+------
ja/index.md                                                       |     1 |  21.81K | 0.876
_layouts/post.html                                                |    34 | 888.25K | 0.333
_includes/header.html                                             |    61 | 510.29K | 0.207
feed.xml                                                          |     1 | 192.51K | 0.134
_includes/social_buttons.html                                     |    34 | 137.49K | 0.087
_includes/recent_posts.html                                       |    35 | 141.26K | 0.049
ja/works/index.md                                                 |     1 |  46.89K | 0.046
_layouts/default.html                                             |    11 | 153.88K | 0.040
_includes/post.html                                               |    36 | 144.35K | 0.036
_includes/footer.html                                             |    56 |  89.98K | 0.029
_layouts/redirect.html                                            |     5 |  44.69K | 0.026
_layouts/plain.html                                               |     3 | 116.91K | 0.012
_includes/author.html                                             |    34 |  21.92K | 0.010
_includes/thumbnail.html                                          |    53 |   7.37K | 0.009
_layouts/posts.html                                               |     2 |  33.64K | 0.007
_layouts/legal.html                                               |     2 |  78.64K | 0.007
_layouts/plain_without_thumbnail.html                             |     2 |  62.41K | 0.007
_includes/google-analytics.html                                   |    56 |   0.05K | 0.006
ja/doorkeeper/index.md                                            |     1 |  23.59K | 0.005
_layouts/english.html                                             |     1 |  25.51K | 0.004
ja/docs/work-regulations/index.md                                 |     1 |  42.59K | 0.004
_includes/sitemap.html                                            |    56 |  41.45K | 0.004
_layouts/doorkeeper.html                                          |     1 |  36.95K | 0.004
ja/posts/index.md                                                 |     1 |  13.30K | 0.003
_includes/numbering-section.html                                  |     2 |  11.80K | 0.002
ja/docs/wage-regulations/index.md                                 |     1 |  12.61K | 0.002
_includes/contact-form.html                                       |    18 |  24.76K | 0.002
ja/agile/index.md                                                 |     1 |  18.63K | 0.002
_includes/community.html                                          |     1 |  10.27K | 0.001
_includes/facebook-sdk.html                                       |    56 |  21.05K | 0.001
_includes/agile-schedule.html                                     |     1 |   0.73K | 0.001
_includes/profile_company.html                                    |     4 |  23.94K | 0.001
_includes/recent_tweets.html                                      |    35 |  15.93K | 0.001
ja/about/index.md                                                 |     1 |  17.99K | 0.001
_includes/member.html                                             |     1 |   6.07K | 0.001
_includes/numbering-chapter.html                                  |     2 |   1.99K | 0.001
ja/join-forces/index.md                                           |     1 |  18.90K | 0.000
ja/works/achievements.md                                          |     1 |  29.08K | 0.000
_posts/2019-06-29-payment-implmentation-with-stripe.md/#excerpt   |     1 |   7.33K | 0.000
_posts/2019-03-15-work-life-balance-at-81st-ipsj.md               |     1 |   2.78K | 0.000
_posts/2019-03-10-hackers-champloo-2019-gold-sponsor.md           |     1 |   1.39K | 0.000
_posts/2019-06-29-payment-implmentation-with-stripe.md            |     1 |   7.33K | 0.000
_posts/2019-07-03-hanachin-given-award-from-agileware.md/#excerpt |     1 |   2.10K | 0.000
en/agile/index.md                                                 |     1 |   3.38K | 0.000
_posts/2019-03-23-no-code-reviews-at-railsdm-2019.md              |     1 |   1.93K | 0.000
_posts/2019-06-08-remote-work-from-okinawa.md                     |     1 |   7.28K | 0.000
_includes/clients.html                                            |     3 |   8.50K | 0.000
en/index.md                                                       |     1 |   7.79K | 0.000
_posts/2019-03-21-jp-stripes-connect-2019.md                      |     1 |   1.99K | 0.000
_posts/2019-07-03-hanachin-given-award-from-agileware.md          |     1 |   2.10K | 0.000

                    done in 7.574 seconds.

Auto-regeneration: disabled. Use --watch to enable.

After

Done in 2.148 seconds.
$ bundle exec jekyll build --profile
Configuration file: /Users/yasulab/yasslab.jp/_config.yml
            Source: /Users/yasulab/yasslab.jp
       Destination: /Users/yasulab/yasslab.jp/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts

Filename                                                          | Count |    Bytes |  Time
------------------------------------------------------------------+-------+----------+------
ja/index.md                                                       |     1 |   21.81K | 0.997
_layouts/post.html                                                |    34 |  888.25K | 0.221
_includes/header.html                                             |    61 |  510.29K | 0.098
_includes/social_buttons.html                                     |    68 |  137.49K | 0.077
_includes/recent_posts.html                                       |    35 |  141.26K | 0.051
feed.xml                                                          |     1 |  192.52K | 0.050
ja/works/index.md                                                 |     1 |   46.89K | 0.046
_includes/post.html                                               |   384 |  144.35K | 0.026
_layouts/default.html                                             |    11 |  153.88K | 0.020
_includes/footer.html                                             |    56 |   89.98K | 0.019
ja/docs/work-regulations/index.md                                 |     1 |   42.59K | 0.012
_includes/numbering-section.html                                  |    64 |   11.80K | 0.010
_layouts/redirect.html                                            |     5 |   44.69K | 0.007
_layouts/plain.html                                               |     3 |  116.91K | 0.006
ja/doorkeeper/index.md                                            |     1 |   23.59K | 0.006
_layouts/legal.html                                               |     2 |   78.64K | 0.005
_includes/author.html                                             |    68 |   21.92K | 0.004
_layouts/plain_without_thumbnail.html                             |     2 |   62.41K | 0.004
_layouts/posts.html                                               |     2 |   33.64K | 0.004
ja/posts/index.md                                                 |     1 |   13.30K | 0.003
_includes/thumbnail.html                                          |    53 |    7.37K | 0.002
ja/agile/index.md                                                 |     1 |   18.63K | 0.002
_layouts/doorkeeper.html                                          |     1 |   36.95K | 0.002
_layouts/english.html                                             |     1 |   25.51K | 0.002
ja/docs/wage-regulations/index.md                                 |     1 |   12.61K | 0.002
_includes/sitemap.html                                            |    56 |   41.45K | 0.002
_includes/agile-schedule.html                                     |     1 |    0.73K | 0.001
_includes/community.html                                          |    11 |   10.27K | 0.001
_includes/google-analytics.html                                   |    56 |    0.05K | 0.001
ja/about/index.md                                                 |     1 |   17.99K | 0.001
_includes/member.html                                             |    12 |    6.07K | 0.001
_includes/numbering-chapter.html                                  |    11 |    1.99K | 0.001
_includes/contact-form.html                                       |    18 |   24.76K | 0.000
_includes/profile_company.html                                    |     4 |   23.94K | 0.000
_includes/facebook-sdk.html                                       |    56 |   21.05K | 0.000
ja/join-forces/index.md                                           |     1 |   18.90K | 0.000
_includes/recent_tweets.html                                      |    35 |   15.93K | 0.000
_posts/2019-06-29-payment-implmentation-with-stripe.md            |     1 |    7.33K | 0.000
ja/works/achievements.md                                          |     1 |   29.08K | 0.000
_posts/2019-03-10-hackers-champloo-2019-gold-sponsor.md           |     1 |    1.39K | 0.000
en/agile/index.md                                                 |     1 |    3.38K | 0.000
_posts/2019-06-29-payment-implmentation-with-stripe.md/#excerpt   |     1 |    7.33K | 0.000
en/index.md                                                       |     1 |    7.79K | 0.000
_posts/2019-06-08-remote-work-from-okinawa.md                     |     1 |    7.28K | 0.000
_posts/2019-07-03-hanachin-given-award-from-agileware.md/#excerpt |     1 |    2.10K | 0.000
_posts/2019-03-23-no-code-reviews-at-railsdm-2019.md              |     1 |    1.93K | 0.000
_posts/2019-03-15-work-life-balance-at-81st-ipsj.md               |     1 |    2.78K | 0.000
_posts/2019-07-03-hanachin-given-award-from-agileware.md          |     1 |    2.10K | 0.000
ja/privacy/index.md                                               |     1 |    4.06K | 0.000
_posts/2019-03-21-jp-stripes-connect-2019.md                      |     1 |    1.99K | 0.000
------------------------------------------------------------------+-------+----------+------
TOTAL (for 50 files)                                              |  1133 | 3138.94K | 1.688

                    done in 2.148 seconds.

Auto-regeneration: disabled. Use --watch to enable.

yasulab added some commits Jul 28, 2019

@yasulab yasulab self-assigned this Jul 28, 2019

@yasulab yasulab temporarily deployed to yasslab-jp-pr-123 Jul 28, 2019 Inactive

@yasulab yasulab had a problem deploying to yasslab-jp-pr-123 Jul 28, 2019 Failure

@yasulab yasulab had a problem deploying to yasslab-jp-pr-123 Jul 28, 2019 Failure

@yasulab yasulab changed the title [WIP] Reduce building time by using Jekyll 4 Reduce building time by using Jekyll 4 Jul 28, 2019

@yasulab yasulab had a problem deploying to yasslab-jp-pr-123 Jul 28, 2019 Failure

@yasulab yasulab had a problem deploying to yasslab-jp-pr-123 Jul 28, 2019 Failure

@yasulab yasulab merged commit 4430cb9 into master Jul 28, 2019

2 checks passed

WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@yasulab yasulab deleted the speed-up-with-jekyll-4 branch Jul 28, 2019

@yasulab yasulab changed the title Reduce building time by using Jekyll 4 Reduce building time by using Jekyll 4.0.0 Jul 28, 2019

@@ -49,7 +49,6 @@ frogs: "[Ryukyufrogs](https://www.ryukyu-frogs.com)"

highlighter: rouge

This comment has been minimized.

Copy link
@DirtyF

DirtyF Jul 30, 2019

No need to mention, this is already the default

@@ -49,7 +49,6 @@ frogs: "[Ryukyufrogs](https://www.ryukyu-frogs.com)"

highlighter: rouge
markdown: kramdown

This comment has been minimized.

Copy link
@DirtyF

DirtyF Jul 30, 2019

Same here, already the default, not needed.

This comment has been minimized.

Copy link
@yasulab

yasulab Jul 31, 2019

Author Member

Didn't know it! Thanks for your comments! 😻

This comment has been minimized.

Copy link
@DirtyF

@yasulab yasulab changed the title Reduce building time by using Jekyll 4.0.0 Reduce 71.6% of building time by using Jekyll 4.0.0 Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.