用gitbook在debug时,当改动了md文件:
然后gitbook的确会检测到改动,然后去更新。
但是当md文件很多时:
更新时间特别慢:
比如某次,耗时20多秒:
<code>Starting server ... Serving book on http://localhost:4000 Restart after change in file src/appendix/reference.md Stopping server info: 24 plugins are installed info: 19 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "livereload"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files init! finish! info: >> generation finished with success in 24.4s ! Starting server ... Serving book on http://localhost:4000 </code>
实在难以忍受啊。
而之前当md文件少时,则更新很快,也就1,2秒左右的。
此处看看是否有可能去优化,提高速度。
gitbook debug update too slow
Generating slowly when the file number is large · Issue #1497 · GitbookIO/gitbook
加上
<code>--timing </code>
参数:
<code>gitbook serve --timing $(CURRENT_DIR) $(DEBUG_PATH) </code>
看看效果
发现没用。
然后看了看help
<code>➜ http_restful_api git:(master) ✗ gitbook help build [book] [output] build a book --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) --format Format to build to (Default is website; Values are website, json, ebook) --[no-]timing Print timing debug information (Default is false) serve [book] [output] serve the book as a website for testing --port Port for server to listen on (Default is 4000) --lrport Port for livereload server to listen on (Default is 35729) --[no-]watch Enable file watcher and live reloading (Default is true) --[no-]live Enable live reloading (Default is true) --[no-]open Enable opening book in browser (Default is false) --browser Specify browser for opening book (Default is ) --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) --format Format to build to (Default is website; Values are website, json, ebook) install [book] install all plugins dependencies --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) parse [book] parse and print debug information about a book --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) init [book] setup and create files for chapters --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) pdf [book] [output] build a book into an ebook file --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) epub [book] [output] build a book into an ebook file --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) mobi [book] [output] build a book into an ebook file --log Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled) </code>
发现只有
gitbook build
才有这个参数,而:
gitbook serve
没有
gitbook generating too slow · Issue #2048 · GitbookIO/gitbook
和我类似问题,但是我这里是gitbook serve的debug,不是build
Slow performance when listing assets in version 3.0.0 · Issue #1289 · GitbookIO/gitbook
File save is too slow for me!! · Issue #1315 · GitbookIO/gitbook
gitbook serve too slow
git serve can’t restart when file changes · Issue #1379 · GitbookIO/gitbook
Performance · Issue #118 · GitbookIO/editor-legacy
Need help polishing Gitbook · Issue #345 · reduxjs/redux
Highlighting Rows In Code Blocks · Issue #433 · GitbookIO/gitbook
gitbook serve update slow
算了,去build,加上:–timing
<code>## Generate gitbook website website: generate_book_json clean_website create_folder_website @echo ================================================================================ @echo Generate website for $(BOOK_NAME) gitbook build --timing $(CURRENT_DIR) $(WEBSITE_FULLNAME) ## Generate PDF file pdf: generate_book_json clean_pdf create_folder_pdf @echo ================================================================================ @echo Generate PDF for $(BOOK_NAME) gitbook pdf --timing $(CURRENT_DIR) $(PDF_FULLNAME) ## Generate ePub file epub: generate_book_json clean_epub create_folder_epub @echo ================================================================================ @echo Generate ePub for $(BOOK_NAME) gitbook epub --timing $(CURRENT_DIR) $(EPUB_FULLNAME) ## Generate Mobi file mobi: generate_book_json clean_mobi create_folder_mobi @echo ================================================================================ @echo Generate Mobi for $(BOOK_NAME) gitbook mobi --timing $(CURRENT_DIR) $(MOBI_FULLNAME) </code>
看看效果:
<code>Generate website for http_restful_api gitbook build --timing /Users/crifan/GitBook/Library/Import/http_restful_api /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/website debug: 0.8% of time spent in "parse.book" (1 times) : debug: > Total: 16ms | Average: 16ms debug: > Min: 16ms | Max: 16ms debug: --------------------------- debug: 2.01s spent in non-mesured sections FileNotFoundError: No "README" file (or is ignored) </code>
把参数放最后:
<code>gitbook build $(CURRENT_DIR) $(WEBSITE_FULLNAME) --timing </code>
结果:
<code>Generate website for http_restful_api gitbook build /Users/crifan/GitBook/Library/Import/http_restful_api /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/website --timing info: 24 plugins are installed info: 18 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files warn: "options" property is deprecated, use config.get(key) instead warn: "options.generator" property is deprecated, use "output.name" instead init! finish! info: >> generation finished with success in 2.4s ! 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.config" (1 times) : debug: > Total: 2ms | Average: 2ms debug: > Min: 2ms | Max: 2ms debug: --------------------------- debug: 0.1% of time spent in "call.hook.init" (1 times) : debug: > Total: 3ms | Average: 3ms debug: > Min: 3ms | Max: 3ms debug: --------------------------- debug: 0.2% of time spent in "parse.listAssets" (1 times) : debug: > Total: 7ms | Average: 7ms debug: > Min: 7ms | Max: 7ms debug: --------------------------- debug: 0.2% of time spent in "call.hook.finish" (1 times) : debug: > Total: 9ms | Average: 9ms debug: > Min: 9ms | Max: 9ms debug: --------------------------- debug: 0.4% of time spent in "call.hook.page:before" (19 times) : debug: > Total: 15ms | Average: 1ms debug: > Min: 0ms | Max: 3ms debug: --------------------------- debug: 1.3% of time spent in "parse.listPages" (1 times) : debug: > Total: 53ms | Average: 53ms debug: > Min: 53ms | Max: 53ms debug: --------------------------- debug: 2.1% of time spent in "parse.book" (1 times) : debug: > Total: 88ms | Average: 88ms debug: > Min: 88ms | Max: 88ms debug: --------------------------- debug: 2.6% of time spent in "plugins.findForBook" (1 times) : debug: > Total: 108ms | Average: 108ms debug: > Min: 108ms | Max: 108ms debug: --------------------------- debug: 3.2% of time spent in "call.hook.page" (19 times) : debug: > Total: 132ms | Average: 7ms debug: > Min: 1ms | Max: 43ms debug: --------------------------- debug: 7.6% of time spent in "page.generate" (19 times) : debug: > Total: 313ms | Average: 16ms debug: > Min: 7ms | Max: 55ms debug: --------------------------- debug: 7.7% of time spent in "plugin.load" (18 times) : debug: > Total: 320ms | Average: 18ms debug: > Min: 2ms | Max: 153ms debug: --------------------------- debug: 25.1% of time spent in "template.render" (38 times) : debug: > Total: 1.04s | Average: 27ms debug: > Min: 0ms | Max: 91ms debug: --------------------------- debug: 2.04s spent in non-mesured sections rm -rf /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/pdf mkdir -p /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/pdf ================================================================================ Generate PDF for http_restful_api gitbook pdf /Users/crifan/GitBook/Library/Import/http_restful_api /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/pdf/http_restful_api.pdf --timing info: 24 plugins are installed info: 18 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files warn: "options" property is deprecated, use config.get(key) instead warn: "options.generator" property is deprecated, use "output.name" instead init! finish! info: >> generation finished with success in 13.2s ! info: >> 1 file(s) generated rm -rf /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/epub mkdir -p /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/epub ================================================================================ Generate ePub for http_restful_api gitbook epub /Users/crifan/GitBook/Library/Import/http_restful_api /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/epub/http_restful_api.epub --timing info: 24 plugins are installed info: 18 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files warn: "options" property is deprecated, use config.get(key) instead warn: "options.generator" property is deprecated, use "output.name" instead init! finish! info: >> generation finished with success in 7.5s ! info: >> 1 file(s) generated rm -rf /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/mobi mkdir -p /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/mobi ================================================================================ Generate Mobi for http_restful_api gitbook mobi /Users/crifan/GitBook/Library/Import/http_restful_api /Users/crifan/GitBook/Library/Import/http_restful_api/output/http_restful_api/mobi/http_restful_api.mobi --timing info: 24 plugins are installed info: 18 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files warn: "options" property is deprecated, use config.get(key) instead warn: "options.generator" property is deprecated, use "output.name" instead init! finish! info: >> generation finished with success in 11.2s ! info: >> 1 file(s) generated ================================================================================ Generate All for http_restful_api </code>
是:
build website速度很快,最慢一共也就1,2秒。
build pdf 耗时 13秒
build epub 耗时 7秒
build mobi 耗时 11秒
-》总体上,还算能接受的。
但是此处的debug时的:
gitbook serve还是很慢
却找不到解决办法
gitbook serve reload slow
How to disable livereload of gitbook – Stack Overflow
<code>➜ http_restful_api git:(master) gitbook --help Usage: gitbook [options] [command] Options: -v, --gitbook [version] specify GitBook version to use -d, --debug enable verbose error -V, --version Display running versions of gitbook and gitbook-cli -h, --help output usage information Commands: ls List versions installed locally current Display currently activated version ls-remote List remote versions available for install fetch [version] Download and install a <version> alias [folder] [version] Set an alias named <version> pointing to <folder> uninstall [version] Uninstall a version update [tag] Update to the latest version of GitBook help List commands for GitBook * run a command with a specific gitbook version </code>
去加上log:
<code>gitbook serve $(CURRENT_DIR) $(DEBUG_PATH) --log debug </code>
结果:
<code>gitbook serve /Users/crifan/GitBook/Library/Import/http_restful_api /Users/crifan/GitBook/Library/Import/http_restful_api/debug --log debug Live reload server started on port: 35729 Press CTRL+C to quit ... debug: readme found at README.md debug: summary file found at SUMMARY.md debug: cleanup folder "/Users/crifan/GitBook/Library/Import/http_restful_api/debug" info: 24 plugins are installed info: 19 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "livereload"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files debug: calling hook "config" debug: calling hook "init" warn: "options" property is deprecated, use config.get(key) instead warn: "options.generator" property is deprecated, use "output.name" instead init! debug: copy assets from theme /Users/crifan/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-theme-default/_assets/website debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-theme-comscore/book debug: copy resources from plugin /Users/crifan/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-fontsettings/assets debug: copy resources from plugin /Users/crifan/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-livereload/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-toolbar-button/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-callouts/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-copy-code-button/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-donate/assets debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-ga/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-expandable-chapters-small/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-tbfed-pagefooter/assets debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-sharing-plus/assets debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-splitter/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-github-buttons/lib debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/prism-themes/themes debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-disqus/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-search-plus/assets debug: copy asset "assets/favicon.ico" debug: copy asset "assets/img/create_new_md_preview_1.png" debug: copy asset "assets/img/create_new_md_preview_2.png" debug: copy asset "assets/img/have_state.png" debug: copy asset "assets/img/postman_debug_api.png" debug: copy asset "assets/img/postman_generated_api_doc.png" debug: copy asset "assets/img/pycharm_restful_api_tool.png" debug: copy asset "assets/img/stateless.png" debug: copy asset "assets/img/swagger_generated_api_doc.png" debug: copy asset "assets/img/youdao_markdown_explain_preview_1.png" debug: copy asset "assets/img/youdao_markdown_explain_preview_2.png" debug: copy asset "assets/img/youdao_markdown_preview_1.png" debug: copy asset "assets/img/youdao_markdown_preview_2.png" debug: generate page "README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page README.md debug: generate page "restful_intro/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_intro/README.md debug: generate page "restful_intro/example.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_intro/example.md debug: generate page "restful_rule/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_rule/README.md debug: generate page "restful_rule/rule.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_rule/rule.md debug: generate page "restful_rule/hateoas.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_rule/hateoas.md debug: generate page "restful_tool/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_tool/README.md debug: generate page "restful_tool/test_tool.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_tool/test_tool.md debug: generate page "restful_tool/framework_lib.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_tool/framework_lib.md debug: generate page "restful_doc/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/README.md debug: generate page "restful_doc/use_markdown.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/use_markdown.md debug: generate page "restful_doc/use_postman.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/use_postman.md debug: generate page "restful_doc/use_swagger.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/use_swagger.md debug: generate page "restful_experience/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/README.md debug: generate page "restful_experience/bad_design.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/bad_design.md debug: generate page "restful_experience/resp_data_style.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/resp_data_style.md debug: generate page "restful_experience/experience_other.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/experience_other.md debug: generate page "appendix/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page appendix/README.md debug: generate page "appendix/reference.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page appendix/reference.md debug: calling hook "finish:before" debug: calling hook "finish" debug: write search index finish! info: >> generation finished with success in 3.4s ! Starting server ... Serving book on http://localhost:4000 </code>
可见:
首次serve的时候,也只需要3.4秒
但是为何每次living reload=refresh=更新加载
却要10多秒呢?
刚刚再去测试,改动一个文件,然后重新加载,好像也只需要3秒左右:
<code>Restart after change in file src/README.md Stopping server debug: readme found at README.md debug: summary file found at SUMMARY.md debug: cleanup folder "/Users/crifan/GitBook/Library/Import/http_restful_api/debug" info: 24 plugins are installed info: 19 explicitly listed info: loading plugin "search-plus"... OK info: loading plugin "disqus"... OK info: loading plugin "prism"... OK info: loading plugin "prism-themes"... OK info: loading plugin "github-buttons"... OK info: loading plugin "splitter"... OK info: loading plugin "sharing-plus"... OK info: loading plugin "tbfed-pagefooter"... OK info: loading plugin "expandable-chapters-small"... OK info: loading plugin "ga"... OK info: loading plugin "donate"... OK info: loading plugin "sitemap-general"... OK info: loading plugin "copy-code-button"... OK info: loading plugin "callouts"... OK info: loading plugin "toolbar-button"... OK info: loading plugin "livereload"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-comscore"... OK info: loading plugin "theme-default"... OK info: found 19 pages info: found 13 asset files debug: calling hook "config" debug: calling hook "init" init! debug: copy assets from theme /Users/crifan/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-theme-default/_assets/website debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-theme-comscore/book debug: copy resources from plugin /Users/crifan/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-fontsettings/assets debug: copy resources from plugin /Users/crifan/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-livereload/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-toolbar-button/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-callouts/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-copy-code-button/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-donate/assets debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-ga/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-expandable-chapters-small/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-tbfed-pagefooter/assets debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-sharing-plus/assets debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-splitter/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-github-buttons/lib debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/prism-themes/themes debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-disqus/book debug: copy resources from plugin /Users/crifan/GitBook/Library/Import/http_restful_api/node_modules/gitbook-plugin-search-plus/assets debug: copy asset "assets/favicon.ico" debug: copy asset "assets/img/create_new_md_preview_1.png" debug: copy asset "assets/img/create_new_md_preview_2.png" debug: copy asset "assets/img/have_state.png" debug: copy asset "assets/img/postman_debug_api.png" debug: copy asset "assets/img/postman_generated_api_doc.png" debug: copy asset "assets/img/pycharm_restful_api_tool.png" debug: copy asset "assets/img/stateless.png" debug: copy asset "assets/img/swagger_generated_api_doc.png" debug: copy asset "assets/img/youdao_markdown_explain_preview_1.png" debug: copy asset "assets/img/youdao_markdown_explain_preview_2.png" debug: copy asset "assets/img/youdao_markdown_preview_1.png" debug: copy asset "assets/img/youdao_markdown_preview_2.png" debug: generate page "README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page README.md debug: generate page "restful_intro/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_intro/README.md debug: generate page "restful_intro/example.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_intro/example.md debug: generate page "restful_rule/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_rule/README.md debug: generate page "restful_rule/rule.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_rule/rule.md debug: generate page "restful_rule/hateoas.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_rule/hateoas.md debug: generate page "restful_tool/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_tool/README.md debug: generate page "restful_tool/test_tool.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_tool/test_tool.md debug: generate page "restful_tool/framework_lib.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_tool/framework_lib.md debug: generate page "restful_doc/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/README.md debug: generate page "restful_doc/use_markdown.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/use_markdown.md debug: generate page "restful_doc/use_postman.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/use_postman.md debug: generate page "restful_doc/use_swagger.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_doc/use_swagger.md debug: generate page "restful_experience/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/README.md debug: generate page "restful_experience/bad_design.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/bad_design.md debug: generate page "restful_experience/resp_data_style.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/resp_data_style.md debug: generate page "restful_experience/experience_other.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page restful_experience/experience_other.md debug: generate page "appendix/README.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page appendix/README.md debug: generate page "appendix/reference.md" debug: calling hook "page:before" debug: calling hook "page" debug: index page appendix/reference.md debug: calling hook "finish:before" debug: calling hook "finish" debug: write search index finish! info: >> generation finished with success in 4.3s ! Starting server ... Serving book on http://localhost:4000 </code>
那就奇怪了
-》难道是之前Mac没有重启,导致的运行慢了?
gitbook live reloading slow
git serve can’t restart when file changes · Issue #1379 · GitbookIO/gitbook
update some dependencies to solve issue with running under windows · tepez/gitbook@ea61239
gitbook serve 2.1.2 not live reloading · Issue #1206 · GitbookIO/gitbook
how to disable live reloading plugin · Issue #1232 · GitbookIO/gitbook
gitbook serve 刷新 太慢
gitbook serve 太慢
【总结】
目前,对于
<code>gitbook serve </code>
本地调试的时候,改动文件,重新加载刷新的时间:
很慢很慢,要10多秒
后来:
重启了Mac后
好像暂时解决了问题。
但是估计以后还会出现。
不过,此处加了log参数:
<code>gitbook serve --log debug </code>
可以输出更多过程信息
-》从而可以在以后再出现刷新慢的问题的时候,可以看看,到底是哪些部分加载比较慢。
-〉或许有机会找到问题原因,尝试去解决。
转载请注明:在路上 » 【暂时解决】gitbook调试时文件改动后页面刷新特别慢