GitBook-Cli 打包很慢

场景

如题所述,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.
阅读 3.2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进