vim-jp / vim-jp/vimdoc-ja-working
deploy/Generate new documentを速くする
@koron is already working on this.
Since Dec 19, 2021.
- Dominant language
- Vim Script
- Stars
- 84
- Forks
- 61
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 35
Description
現在deployのGenerate new documentがボトルネックになっている。
例えば このビルド では全体で 3m7s のうち
実に 2m52s (約92%) がGenerate new document に費やされている。
Generate new document は make html を実行しており、
https://github.com/vim-jp/vimdoc-ja-working/blob/7ebdd1682ec7b457cc2e4fa3b60ffb756c520266/Makefile#L12-L16
これは tools/buildhtml.vim で行われてる。
buildhtml.vim は MakeHtmlAll で全 *.jax を *.html に変換してから、各ファイルにJekyll用のYAMLヘッダーを付けている。
ファイルが多いのに加えてこの部分が順次直列に変化するために時間がかかっていると推測される。
よってこの部分をファイル単位で並列化できれば高速化が期待できる。
解決策案
MakeHmtlAllはファイルを列挙して MakeHtml を呼び出すようになっている。
なのでラッパースクリプトとして、
引数でファイルを1つ受け取ってMakeHtmlを実行しYAMLヘッダーを付与する
スクリプトを作れば、
makeファイルによる呼び出し側から並列度をコントロールできるようになると考えられる。
Vim内で並列化することはほぼ不可能(terminalとか駆使すればできるかもだけど)なので
やらないほうが得策。
残課題
- 一部ファイルのファイル名が異なる (mandatory)
- Makefileの依存関係見直し (mandatory)
-
2html.vimのボトルネックの把握 (optional)手を入れるほどではなかった -
実行時のプログレス表示、検討・改善 (optional)めんどいのでやらない
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.