"jekyll build --lsi" 使博客非常非常慢
"jekyll build --lsi" make blog very very slow
我用 jekyll 创建了一个博客。
最近related_posts只推荐最新的post
最近用jekyll build - lsi
命令做了一个很好的post推荐
您可以在 https://jekyllrb.com/docs/variables/ link 阅读这部分内容。
总之,liquid 变量更新 site.related_posts
部分以索引相关的 posts.
顺便说一下,在那之后,构建速度非常慢,即使我已经删除了所有相关的宝石,它仍然很慢。 _config 相关变量
我不知道如何才能恢复它...
来自您在问题中链接到的同一页面:
For high quality but slow to compute results, run the jekyll
command with the --lsi
(latent semantic indexing) option.
因此,"slowness" 是使用 --lsi
选项的已记录和预期的副作用。
如果你觉得 "extra slowness" 只出现在 v3.8.x
而不是以前的版本,我强烈建议你 open an issue 在 Jekyll 的 GitHub 仓库。
--lsi
选项来自 classifier-reborn
gem, which includes the following note about increasing speed under the dependencies 标题:
To speed up LSI classification by at least 10x consider installing
following libraries.
Note that LSI will work without these libraries, but as soon as they
are installed, classifier will make use of them. No configuration
changes are needed, we like to keep things ridiculously easy for you.
gsl
gem's installation docs提到:
the GSL libraries must already be installed before Ruby/GSL can be installed:
- Debian/Ubuntu: +libgsl0-dev+
- Fedora/SuSE: +gsl-devel+
- Gentoo: +sci-libs/gsl+
- OS X:
brew install gsl
gsl
gem can also make use of nmatrix
or narray
,我相信这可能会进一步增加speed/efficiency:
In order to use rb-gsl with NMatrix you must first set the NMATRIX
environment variable and then install rb-gsl:
gem install nmatrix
export NMATRIX=1
gem install rb-gsl
This will compile rb-gsl with NMatrix specific functions.
For using rb-gsl with NArray:
gem install narray
export NARRAY=1
gem install rb-gsl
Note that setting both NMATRIX
and NARRAY
variables will lead to
undefined behaviour. Only one can be used at a time.
我不确定 nmatrix
还是 narray
是 better/faster 的选择,尽管我确实在 classifier-reborn
存储库上打开了 https://github.com/jekyll/classifier-reborn/issues/192
。
我确实注意到旧的 narray GitHub repo mentions that the package is no longer maintained, and instead links to a new version: Ruby/Numo::NArray
Numo::NArray is an Numerical N-dimensional Array class for fast processing and easy manipulation of multi-dimensional numerical data, similar to numpy.ndaray. This project is the successor to Ruby/NArray.
Numo::NArray 还链接到 numo-gsl
,这似乎与 gsl 绑定相关:
GSL interface for Ruby/Numo::NArray
现阶段我不确定 classifier-reborn
是否能够利用这些 numo 依赖项中的任何一个,但如果可以的话,我猜测它们将是 faster/more积极维护。
我用 jekyll 创建了一个博客。 最近related_posts只推荐最新的post
最近用jekyll build - lsi
命令做了一个很好的post推荐
您可以在 https://jekyllrb.com/docs/variables/ link 阅读这部分内容。
总之,liquid 变量更新 site.related_posts
部分以索引相关的 posts.
顺便说一下,在那之后,构建速度非常慢,即使我已经删除了所有相关的宝石,它仍然很慢。 _config 相关变量 我不知道如何才能恢复它...
来自您在问题中链接到的同一页面:
For high quality but slow to compute results, run the
jekyll
command with the--lsi
(latent semantic indexing) option.
因此,"slowness" 是使用 --lsi
选项的已记录和预期的副作用。
如果你觉得 "extra slowness" 只出现在 v3.8.x
而不是以前的版本,我强烈建议你 open an issue 在 Jekyll 的 GitHub 仓库。
--lsi
选项来自 classifier-reborn
gem, which includes the following note about increasing speed under the dependencies 标题:
To speed up LSI classification by at least 10x consider installing following libraries.
Note that LSI will work without these libraries, but as soon as they are installed, classifier will make use of them. No configuration changes are needed, we like to keep things ridiculously easy for you.
gsl
gem's installation docs提到:
the GSL libraries must already be installed before Ruby/GSL can be installed:
- Debian/Ubuntu: +libgsl0-dev+
- Fedora/SuSE: +gsl-devel+
- Gentoo: +sci-libs/gsl+
- OS X:
brew install gsl
gsl
gem can also make use of nmatrix
or narray
,我相信这可能会进一步增加speed/efficiency:
In order to use rb-gsl with NMatrix you must first set the NMATRIX environment variable and then install rb-gsl:
gem install nmatrix
export NMATRIX=1
gem install rb-gsl
This will compile rb-gsl with NMatrix specific functions.
For using rb-gsl with NArray:
gem install narray
export NARRAY=1
gem install rb-gsl
Note that setting both
NMATRIX
andNARRAY
variables will lead to undefined behaviour. Only one can be used at a time.
我不确定 nmatrix
还是 narray
是 better/faster 的选择,尽管我确实在 classifier-reborn
存储库上打开了 https://github.com/jekyll/classifier-reborn/issues/192
。
我确实注意到旧的 narray GitHub repo mentions that the package is no longer maintained, and instead links to a new version: Ruby/Numo::NArray
Numo::NArray is an Numerical N-dimensional Array class for fast processing and easy manipulation of multi-dimensional numerical data, similar to numpy.ndaray. This project is the successor to Ruby/NArray.
Numo::NArray 还链接到 numo-gsl
,这似乎与 gsl 绑定相关:
GSL interface for Ruby/Numo::NArray
现阶段我不确定 classifier-reborn
是否能够利用这些 numo 依赖项中的任何一个,但如果可以的话,我猜测它们将是 faster/more积极维护。