Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Long rendering time caused by the sidebar #2635

Open
Labels
topic: performanceRelates to build performance of VuePress
@oscarpenelo

Description

  • I confirm that this is an issue rather than a question.

Bug report

When building a project that contains a complex sidebar (many items) the rendering takes 35min to complete. Compiling the same project without the sidebar takes 2 minutes.

Steps to reproduce

AWS documentation in markdown is being used as a build test (https://github.com/awsdocs)

Run in the terminal

#clone repo with a complex sidebar, you can see the sidebar here: https://github.com/oscarpenelo/vuepress-test/blob/master/docs/src/sidebar.json
git clone https://github.com/oscarpenelo/vuepress-test.git
#install dependencies
cd vuepress-test/docs && npm install
#build without sidebar and check the duration. Internal command: sidebar=false node --max_old_space_size=8192 ./node_modules/vuepress/cli.js build src
time npm run buildwithoutsidebar
#output: npm run buildwithoutsidebar 113,68s user 15,61s system 104% cpu 2:03,85 total
#build with sidebar and check the duration. Internal command: sidebar=true node --max_old_space_size=8192 ./node_modules/vuepress/cli.js build src
time npm run buildwithsidebar
#output: npm run buildwithsidebar 1952.99s user 42.48s system 95% cpu 34:55.82 total

What is expected?

A compilation time under 5 minutes

What is actually happening?

20 times longer duration with sidebar than without (35minutes vs 2minutes)

Other relevant information

  • Output of npx vuepress info in my VuePress project:
    Environment Info:

    System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz
    Binaries:
    Node: 12.16.1 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.8 - ~/tttt/vuepress-test/docs/node_modules/.bin/npm
    Browsers:
    Chrome: 85.0.4183.121
    Edge: Not Found
    Firefox: 81.0
    Safari: 13.1
    npmPackages:
    @vuepress/core: 1.6.0
    @vuepress/theme-default: 1.6.0
    vuepress: ^1.3.0 => 1.6.0
    npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: performanceRelates to build performance of VuePress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /