GitBook-Cli 打包很慢

发布于 2022-09-11 21:07:46 字数 2761 浏览 30 评论 0

场景

如题所述,gitbook-cli 打包时的速度非常慢,吾辈看了一下 debug 日志发现一直出现下面的输出

debug: generate page "di-qi-bu-xue-shao/di-qi-bu-xue-shao-53.md"
debug: calling hook "page:before"
debug: calling hook "page"

刚开始用 gitbook-cli,有人知道这个问题如何解决么?


最后花费时间分析

info: >> generation finished with success in 764.6s !
debug: 0.0% of time spent in "call.hook.finish:before" (1 times) :
debug:     > Total: 0ms | Average: 0ms
debug:     > Min: 0ms | Max: 0ms
debug: ---------------------------
debug: 0.0% of time spent in "call.hook.init" (1 times) :
debug:     > Total: 0ms | Average: 0ms
debug:     > Min: 0ms | Max: 0ms
debug: ---------------------------
debug: 0.0% of time spent in "call.hook.config" (1 times) :
debug:     > Total: 2ms | Average: 2ms
debug:     > Min: 2ms | Max: 2ms
debug: ---------------------------
debug: 0.0% of time spent in "parse.listAssets" (1 times) :
debug:     > Total: 69ms | Average: 69ms
debug:     > Min: 69ms | Max: 69ms
debug: ---------------------------
debug: 0.0% of time spent in "plugins.findForBook" (1 times) :
debug:     > Total: 94ms | Average: 94ms
debug:     > Min: 94ms | Max: 94ms
debug: ---------------------------
debug: 0.0% of time spent in "call.hook.page:before" (403 times) :
debug:     > Total: 152ms | Average: 0ms
debug:     > Min: 0ms | Max: 3ms
debug: ---------------------------
debug: 0.0% of time spent in "plugin.load" (6 times) :
debug:     > Total: 158ms | Average: 26ms
debug:     > Min: 2ms | Max: 116ms
debug: ---------------------------
debug: 0.0% of time spent in "parse.book" (1 times) :
debug:     > Total: 248ms | Average: 248ms
debug:     > Min: 248ms | Max: 248ms
debug: ---------------------------
debug: 0.1% of time spent in "call.hook.finish" (1 times) :
debug:     > Total: 977ms | Average: 977ms
debug:     > Min: 977ms | Max: 977ms
debug: ---------------------------
debug: 0.2% of time spent in "parse.listPages" (1 times) :
debug:     > Total: 1.19s | Average: 1.19s
debug:     > Min: 1.19s | Max: 1.19s
debug: ---------------------------
debug: 0.4% of time spent in "call.hook.page" (403 times) :
debug:     > Total: 2.79s | Average: 7ms
debug:     > Min: 0ms | Max: 58ms
debug: ---------------------------
debug: 2.4% of time spent in "page.generate" (403 times) :
debug:     > Total: 18.61s | Average: 46ms
debug:     > Min: 16ms | Max: 164ms
debug: ---------------------------
debug: 95.1% of time spent in "template.render" (806 times) :
debug:     > Total: 729.10s | Average: 905ms
debug:     > Min: 0ms | Max: 3.53s
debug: ---------------------------
debug: 13.22s spent in non-mesured sections
Done in 767.43s.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文