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

10x as slow build speed on 4.1.0 than 4.0.1 #8233

Closed
iBug opened this issue Jun 7, 2020 · 3 comments · Fixed by #8236
Closed

10x as slow build speed on 4.1.0 than 4.0.1 #8233

iBug opened this issue Jun 7, 2020 · 3 comments · Fixed by #8236
Labels
frozen-due-to-age has-pull-request Somebody suggested a solution to fix this issue

Comments

@iBug
Copy link
Contributor

iBug commented Jun 7, 2020

My Environment

Software Version(s)
Operating System Ubuntu 20.04 LTS (Focal Fossa)
jekyll v4.1.0
github-pages Not applicable

Problem

jekyll build is tremendously slower than v4.0.1. Manually applying 8590ab0 (applying #8221) to my local clone restores the speed of (and slightly faster than) v4.0.1.

Reproduce

I ran this on my website so to save time just use it:

git clone https://github.com/iBug/iBug-source.git test
cd test
git checkout 1072344e4883a1843d724e24170fe74baffe4a48
# Change Jekyll version to v4.1.0 in Gemfile
bundle exec jekyll build

The time varies from 28 seconds to 55 seconds. My best run on my workstation is 28.16s. On Jekyll 4.0.1 the worst time is 5.57s.

To verify the "recovered" speed, change the jekyll line in Gemfile to something like:

gem 'jekyll', git: '/path/to/local/jekyll', branch: :debug

And then apply #8221 onto the local clone. Build my website again and the speed is comparable to that of 4.0.1.

@ashmaroli
Copy link
Member

While we haven't detected any regression in performance while building our documentation site, the PR you link to above has already been merged to master. So, it would make its way into the upcoming v4.1.1.

@iBug
Copy link
Contributor Author

iBug commented Jun 7, 2020

As said by DirtyF here #8221 (comment) I take it as you're planning to introduce it again in the (far) future. I'm still wondering about performance. Would you mind taking a look?

@iBug
Copy link
Contributor Author

iBug commented Jun 7, 2020

Here are my runs on my workstation (Ubuntu 20.04). The command is /usr/bin/time -v bundle exec jekyll build.

Using v4.1.0

Configuration file: /home/ubuntu/proj/ibugone.com/_config.yml
Configuration file: /home/ubuntu/proj/ibugone.com/_local.yml
            Source: /home/ubuntu/proj/ibugone.com
       Destination: /srv/ibugone.com
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
         AutoPages: Disabled/Not configured in site.config.
        Pagination: Complete, processed 2 pagination page(s)

Build Process Summary:

| PHASE      |    TIME |
+------------+---------+
| RESET      |  0.0003 |
| READ       |  0.0475 |
| GENERATE   |  0.0283 |
| RENDER     | 27.9789 |
| CLEANUP    |  0.0117 |
| WRITE      |  0.0573 |
+------------+---------+
| TOTAL TIME | 28.1240 |


Site Render Stats:

| Filename                                                                                                  | Count |    Bytes |   Time |
+-----------------------------------------------------------------------------------------------------------+-------+----------+--------+
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/single.html                         |    64 | 1510.92K | 26.951 |
| _includes/archive-single.html                                                                             |   360 |  312.21K |  0.217 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/read-time.html                     |   351 |    7.71K |  0.169 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/default.html                        |   108 | 3388.94K |  0.135 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/head.html                          |   108 |  724.33K |  0.090 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/seo.html                           |   108 |  651.67K |  0.086 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/archive-taxonomy.html               |    33 |  202.96K |  0.079 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/sidebar.html                       |   107 |  345.78K |  0.060 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/toc.html                           |    40 |   18.15K |  0.040 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/tags.html                           |     1 |   66.42K |  0.039 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/home.html                           |     6 |   38.73K |  0.034 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/author-profile.html                |    99 |  215.70K |  0.029 |
| assets/js/lunr/lunr-store.js                                                                              |     1 |  252.09K |  0.025 |
| _includes/page__hero.html                                                                                 |   108 |   42.75K |  0.025 |
| feed.xml                                                                                                  |     1 |  152.70K |  0.024 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/nav_list                           |   106 |  119.11K |  0.022 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/scripts.html                       |   108 |  231.02K |  0.021 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/posts.html                          |     1 |   29.52K |  0.019 |
| sitemap.xml                                                                                               |     1 |   10.85K |  0.014 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/page__taxonomy.html                |    64 |   13.10K |  0.012 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/social-share.html                  |    60 |   71.95K |  0.011 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/tag-list.html                      |    35 |   12.83K |  0.009 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/archive.html                        |    10 |  178.99K |  0.009 |
| _includes/post_pagination.html                                                                            |    64 |   13.83K |  0.008 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/comments-providers/scripts.html    |   108 |   41.39K |  0.007 |
| _includes/head/custom.html                                                                                |   108 |   73.47K |  0.004 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/gallery                            |     5 |    2.95K |  0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/collection.html                     |     1 |    5.67K |  0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/comments-providers/disqus.html     |    56 |   40.84K |  0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/documents-collection.html          |     1 |    5.63K |  0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/analytics.html                     |   108 |    0.00K |  0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/paginator.html                     |     6 |    3.08K |  0.002 |
| _posts/2019-09-10-raspberry-pi-4-review-benchmark.md                                                      |     1 |   14.41K |  0.002 |
| vendor/bundle/ruby/2.7.0/gems/jekyll-redirect-from-0.16.0/lib/jekyll-redirect-from/redirect.html          |    43 |   24.78K |  0.001 |
| _pages/index.md                                                                                           |     1 |    2.85K |  0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/feature_row                        |     1 |    2.31K |  0.001 |
| _home/status.html                                                                                         |     1 |    1.52K |  0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/splash.html                         |     1 |    4.13K |  0.001 |
| _posts/2019-12-28-mass-crawl-douban-with-aws.md                                                           |     1 |   21.50K |  0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/footer/custom.html                 |   108 |    7.80K |  0.001 |
| _home/cv.md                                                                                               |     1 |    0.96K |  0.001 |
| assets/css/main.css.map                                                                                   |     1 |  323.82K |  0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/author-profile-custom-links.html   |    99 |   21.95K |  0.000 |
| _home/entertainment.md                                                                                    |     1 |    1.90K |  0.000 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/masthead.html                      |     1 |    1.71K |  0.000 |
| _includes/footer.html                                                                                     |     1 |    1.19K |  0.000 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/categories.html                     |     1 |    0.04K |  0.000 |
| _home/friends.md                                                                                          |     1 |    1.09K |  0.000 |
| _home/cv.md/#excerpt                                                                                      |     1 |    0.00K |  0.000 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/search/algolia-search-scripts.html |     1 |    1.55K |  0.000 |
+-----------------------------------------------------------------------------------------------------------+-------+----------+--------+
| TOTAL (for 50 files)                                                                                      |  2602 | 9218.84K | 28.161 |

                    done in 28.14 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
        Command being timed: "sh build-local.sh build --profile"
        User time (seconds): 28.67
        System time (seconds): 0.31
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:28.99
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 159340
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 85444
        Voluntary context switches: 15
        Involuntary context switches: 209
        Swaps: 0
        File system inputs: 41937
        File system outputs: 36041
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

With #8221 applied

Configuration file: /home/ubuntu/proj/ibugone.com/_config.yml
Configuration file: /home/ubuntu/proj/ibugone.com/_local.yml
            Source: /home/ubuntu/proj/ibugone.com
       Destination: /srv/ibugone.com
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
         AutoPages: Disabled/Not configured in site.config.
        Pagination: Complete, processed 2 pagination page(s)

Build Process Summary:

| PHASE      |   TIME |
+------------+--------+
| RESET      | 0.0003 |
| READ       | 0.0471 |
| GENERATE   | 0.0618 |
| RENDER     | 1.8322 |
| CLEANUP    | 0.0115 |
| WRITE      | 0.0572 |
+------------+--------+
| TOTAL TIME | 2.0101 |


Site Render Stats:

| Filename                                                                                                | Count |    Bytes |  Time |
+---------------------------------------------------------------------------------------------------------+-------+----------+-------+
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/single.html                       |    61 |  972.11K | 0.373 |
| _includes/archive-single.html                                                                           |   360 |  312.21K | 0.282 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/read-time.html                   |   351 |    7.71K | 0.221 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/default.html                      |   105 | 2306.76K | 0.188 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/head.html                        |   105 |  201.08K | 0.119 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/seo.html                         |   105 |  130.43K | 0.112 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/sidebar.html                     |   104 |  342.10K | 0.090 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/posts.html                        |     1 |   29.52K | 0.082 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/toc.html                         |    40 |   18.15K | 0.081 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/archive-taxonomy.html             |    33 |  202.96K | 0.077 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/author-profile.html              |    99 |  215.70K | 0.044 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/tags.html                         |     1 |   66.42K | 0.039 |
| _includes/page__hero.html                                                                               |   105 |   41.85K | 0.038 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/home.html                         |     6 |   38.73K | 0.035 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/scripts.html                     |   105 |  225.75K | 0.034 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/nav_list                         |   103 |  115.73K | 0.032 |
| assets/js/lunr/lunr-store.js/#excerpt                                                                   |     1 |  263.02K | 0.028 |
| assets/js/lunr/lunr-store.js                                                                            |     1 |  252.09K | 0.024 |
| feed.xml                                                                                                |     1 |  152.70K | 0.024 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/page__taxonomy.html              |    61 |   13.09K | 0.016 |
| _includes/post_pagination.html                                                                          |    61 |   13.82K | 0.013 |
| sitemap.xml                                                                                             |     1 |   10.85K | 0.013 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/comments-providers/scripts.html  |   105 |   41.39K | 0.012 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/tag-list.html                    |    35 |   12.83K | 0.012 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/social-share.html                |    57 |   68.48K | 0.010 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/archive.html                      |    10 |  178.99K | 0.009 |
| _includes/head/custom.html                                                                              |   105 |   71.48K | 0.006 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/comments-providers/disqus.html   |    56 |   40.84K | 0.004 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/analytics.html                   |   105 |    0.00K | 0.003 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/gallery                          |     5 |    2.95K | 0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/paginator.html                   |     6 |    3.08K | 0.002 |
| vendor/bundle/ruby/2.7.0/gems/jekyll-redirect-from-0.16.0/lib/jekyll-redirect-from/redirect.html        |    43 |   24.78K | 0.002 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/collection.html                   |     1 |    5.67K | 0.002 |
| _posts/2019-09-10-raspberry-pi-4-review-benchmark.md                                                    |     1 |   14.41K | 0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/documents-collection.html        |     1 |    5.63K | 0.001 |
| _pages/index.md                                                                                         |     1 |    2.85K | 0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/feature_row                      |     1 |    2.31K | 0.001 |
| _home/status.html                                                                                       |     1 |    1.52K | 0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/footer/custom.html               |   105 |    7.59K | 0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/author-profile-custom-links.html |    99 |   21.95K | 0.001 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/splash.html                       |     1 |    4.13K | 0.001 |
| _posts/2019-12-28-mass-crawl-douban-with-aws.md                                                         |     1 |   21.50K | 0.001 |
| assets/css/main.css.map                                                                                 |     1 |  323.82K | 0.001 |
| _home/cv.md                                                                                             |     1 |    0.96K | 0.001 |
| _home/entertainment.md                                                                                  |     1 |    1.90K | 0.000 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_includes/masthead.html                    |     1 |    1.71K | 0.000 |
| _includes/footer.html                                                                                   |     1 |    1.19K | 0.000 |
| vendor/bundle/ruby/2.7.0/gems/minimal-mistakes-jekyll-4.19.2/_layouts/categories.html                   |     1 |    0.04K | 0.000 |
| _home/friends.md                                                                                        |     1 |    1.09K | 0.000 |
| _home/cv.md/#excerpt                                                                                    |     1 |    0.00K | 0.000 |
+---------------------------------------------------------------------------------------------------------+-------+----------+-------+
| TOTAL (for 50 files)                                                                                    |  2557 | 6795.92K | 2.042 |

                    done in 2.026 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
        Command being timed: "sh build-local.sh build --profile"
        User time (seconds): 2.55
        System time (seconds): 0.26
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.83
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 92316
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 27721
        Voluntary context switches: 17
        Involuntary context switches: 70
        Swaps: 0
        File system inputs: 39903
        File system outputs: 33902
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

@jekyllbot jekyllbot added the has-pull-request Somebody suggested a solution to fix this issue label Jun 8, 2020
kvz added a commit to kvz/lanyon that referenced this issue Jun 9, 2020
@jekyll jekyll locked and limited conversation to collaborators Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age has-pull-request Somebody suggested a solution to fix this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants