Build Jekyll站点在本地构建需要12-40分钟-帖子和相关帖子文件有问题吗?

Build Jekyll站点在本地构建需要12-40分钟-帖子和相关帖子文件有问题吗?,build,jekyll,github-pages,serve,Build,Jekyll,Github Pages,Serve,我有一个使用Jekyll和GitHub页面构建的小型个人博客。最近,在本地构建/服务站点时,有时需要12-40分钟来构建。以前,在这台电脑上只需要一两分钟,尽管从那时起我已经添加了10篇帖子。耗时最长的两个文件在很长时间内没有改变,但我知道它们是构建的主要模板 我已经多次运行了--profile标记,问题在于我的\u layouts/post.html和\u includes/post/related\u posts.html,以下是我的最新版本: >jekyll build --prof

我有一个使用Jekyll和GitHub页面构建的小型个人博客。最近,在本地构建/服务站点时,有时需要12-40分钟来构建。以前,在这台电脑上只需要一两分钟,尽管从那时起我已经添加了10篇帖子。耗时最长的两个文件在很长时间内没有改变,但我知道它们是构建的主要模板

我已经多次运行了
--profile
标记,问题在于我的
\u layouts/post.html
\u includes/post/related\u posts.html
,以下是我的最新版本:

>jekyll build --profile
Configuration file: C:/Users/twulz/Documents/GitHub/Twulz.github.io/_config.yml
            Source: C:/Users/twulz/Documents/GitHub/Twulz.github.io
       Destination: C:/Users/twulz/Documents/GitHub/Twulz.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Populating LSI...
Rebuilding index...


| Filename                                                   | Count |    Bytes |     Time |
+------------------------------------------------------------+-------+----------+----------+
| _layouts/post.html                                         |    44 |  559.39K |  769.523 |
| _includes/post/related_posts.html                          |    47 |   49.21K |  769.309 |
| _layouts/default.html                                      |    70 | 2448.54K |    1.615 |
| _includes/asides.html                                      |    70 | 1218.71K |    1.115 |
| _includes/asides/archive_tabs.html                         |    70 |  926.82K |    0.556 |
| _includes/asides/recent_posts.html                         |    70 |  223.95K |    0.383 |
| _includes/libs/list_tags                                   |   115 |  626.27K |    0.325 |
| _includes/libs/list_categories                             |   115 |  319.43K |    0.219 |
| index.html                                                 |     1 |    9.07K |    0.185 |
| _includes/libs/list_pages                                  |    96 |   63.14K |    0.164 |
| page3/index.html                                           |     1 |    9.35K |    0.153 |
| page4/index.html                                           |     1 |    8.19K |    0.146 |
| blog/tags.html                                             |     1 |   53.22K |    0.137 |
| atom.xml                                                   |     1 |  505.68K |    0.127 |
| page2/index.html                                           |     1 |    8.91K |    0.115 |
| _includes/navbar.html                                      |    72 |  207.96K |    0.108 |
| _includes/post/post_meta.html                              |    47 |   62.26K |    0.085 |
| blog/categories.html                                       |     1 |   26.61K |    0.073 |
| _layouts/single-with-sidebar.html                          |     3 |    9.25K |    0.067 |
| page5/index.html                                           |     1 |    3.56K |    0.062 |
| assets/bootstrap-2.3.2/js/bootstrap.custom.js              |     1 |   27.96K |    0.058 |
| assets/bootstrap-2.1.1/js/bootstrap.custom.js              |     1 |   18.45K |    0.057 |
| _includes/libs/truncate_exec                               |     5 |    1.49K |    0.049 |
| _includes/bottom.html                                      |    72 |   95.14K |    0.043 |
| _includes/head.html                                        |    72 |  132.24K |    0.042 |
| blog/archives.html                                         |     1 |   11.13K |    0.034 |
| _includes/post/post_pagenation.html                        |    47 |   22.74K |    0.029 |
| sitemap.xml                                                |     1 |   10.63K |    0.026 |
| assets/js/script.js                                        |     1 |    4.50K |    0.022 |
| _includes/footer.html                                      |    72 |   13.08K |    0.018 |
| assets/bootstrap-2.3.2/css/bootstrap.custom.css            |     1 |  103.51K |    0.017 |
| assets/css/style.css                                       |     1 |    9.11K |    0.016 |
| _includes/asides/tweets.html                               |    70 |   38.62K |    0.016 |
| _layouts/single-no-sidebar.html                            |     2 |   20.16K |    0.013 |
| assets/bootstrap-2.3.2/css/bootstrap-responsive.custom.css |     1 |   16.57K |    0.013 |
| _includes/script.html                                      |    72 |   23.91K |    0.010 |
| _includes/header.html                                      |    72 |   12.16K |    0.009 |
| rss.xml                                                    |     1 |    7.57K |    0.006 |
| home.html                                                  |     1 |    2.01K |    0.006 |
| _includes/asides/about.html                                |    70 |   13.95K |    0.004 |
| _includes/libs/thumbnail                                   |    44 |    0.00K |    0.003 |
| _posts/2016-08-17-prusa3dPrinter-electronics.md            |     1 |    4.21K |    0.003 |
| engprojects/other/index.html                               |     1 |    1.58K |    0.003 |
| engprojects/printer/index.html                             |     1 |    1.51K |    0.002 |
| _posts/2016-02-18-rediscovering-the-blog.md                |     1 |   18.79K |    0.002 |
| engprojects/cube4x4x4/index.html                           |     1 |    1.39K |    0.002 |
| _posts/2018-10-10-Building-a-smart-parking-demo.md         |     1 |    5.36K |    0.002 |
| _includes/libs/truncate_start                              |     5 |    0.00K |    0.002 |
| _includes/post/socials_large.html                          |     3 |    3.71K |    0.002 |
| _includes/bootstrap-2.3.2/css/bootstrap.min.css            |     1 |  103.51K |    0.002 |
+------------------------------------------------------------+-------+----------+----------+
| TOTAL (for 50 files)                                       |  1450 | 8064.52K | 1544.978 |

                    done in 794.05 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
这里是
\u layouts/post.html
-我已经删除了社交网络标签(如果与比较)

我已卸载并重新安装了Jekyll,但没有更改。我在这里做错了什么-我还可以看什么来缩短本地构建时间呢?

因为,在我的_config.yml文件中设置lsi:false足以让本地构建缩短到15秒


如上面用户ashmaroli所示,这并不是我的构建时间突然增加的真正原因,但我的问题是“我还可以看什么来缩短本地构建时间?”此修复足以满足我的需要,使我能够在更合理的时间范围内(现在与生产站点相匹配)在本地进行编辑和服务因此,我将此标记为已解决。

我知道这不是您要寻找的答案。但是设置
lsi:false
将大大缩短构建时间。lsi:false实际上将相关的_帖子缩短到了0.063秒!问题肯定是相关文章中的循环,即使仅限于1篇文章,仍然需要8分钟,但当整个循环被删除时,构建时间恢复正常。当我在limit 5和lsi:false中离开循环时,我的构建时间是15秒,这更容易接受。您是否愿意将您的答案作为答案发布,以便我对其进行标记?从技术上讲,您使用lsi:true已超过7年。然而,您最近才注意到性能的下降,在迄今为止最快的Jekyll版本(JekyllV4.0.0)上也是如此。因此,我并不想向读者传达错误的信息,因为他们在这个问题上结结巴巴,看到的答案是
lsi:false
。。如果你必须将这个问题标记为已解决,那么我建议你自己回答这个问题。有一个名为gem的程序可以加速lsi:true的构建,但我从未在Windows上成功安装过它。。。
---
layout: default
group: Blog
---
            <article class="single post">
                <header>
                    <h1>
                        <a href="{{ site.baseurl }}{{ page.url }}" rel="bookmark" title="Permanent link">{{ page.title }}</a>
                    </h1>
                    <p class="meta">
                        <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: site.date_format }}</time>
                    </p>
                </header>
                <div class="content">
{{ content }}
<br>
                </div>
                <footer>
{% include post/post_pagenation.html %}
{% include post/post_meta.html %}
{% include post/related_posts.html %}
                </footer>
            </article>
                    <nav id="related-posts" class="well">
                        <h3>You might also like</h3>
                        <ul>
{% for post in site.related_posts limit:5 %}
                            <li class="related-post">
                                <span>{{ post.date | date: site.date_format }}</span> - 
                                <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
                            </li>
{% endfor %}
                        </ul>
                    </nav>