Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook >10 seconds to launch, slowed down by merge in transformStoriesRawToStoriesHash #11591

Closed
koop-stripe opened this issue Jul 16, 2020 · 3 comments
Assignees
Milestone

Comments

@koop-stripe
Copy link

koop-stripe commented Jul 16, 2020

Describe the bug
Storybook takes 10-15 seconds to launch in production. Most of the time (7-10 seconds) is spent in transformStoriesRawToStoriesHash repeatedly calling merge.

Screenshots of both are provided below. This only occurs for us when building for production. We have 505 stories in our storybook.

To Reproduce
Steps to reproduce the behavior:

  1. Build storybook for production build-storybook --docs -c .storybook -o .storybook-dist
  2. Start the server, load a page in your browser.
  3. Wait 10-15 seconds until the page loads.

Update: I've since confirmed that this also occurs in development mode.

Expected behavior
Don't wait 10-15 seconds. 😛

Screenshots
Full performance view:

storybook-slowdown

Zoomed in on baseMerge calls:
storybook-basemerge

System:
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Binaries:
Node: 10.16.0 - ~/.nodenv/versions/10.16.0/bin/node
Yarn: 1.19.1 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nodenv/versions/10.16.0/bin/npm
Browsers:
Chrome: 83.0.4103.116
Firefox: 78.0.1
Safari: 13.1
npmPackages:
@storybook/addon-docs: 6.0.0-rc.5 => 6.0.0-rc.5
@storybook/react: 6.0.0-rc.5 => 6.0.0-rc.5

@shilman shilman added this to the 6.0 milestone Jul 16, 2020
@koop-stripe koop-stripe changed the title Storybook takes 10-15 seconds to launch in production (baseMerge slowdown) Storybook takes 10-15 seconds to launch in production, 30 seconds to launch in development (baseMerge slowdown) Jul 17, 2020
@koop-stripe koop-stripe changed the title Storybook takes 10-15 seconds to launch in production, 30 seconds to launch in development (baseMerge slowdown) Storybook >10 seconds to launch, slowed down by merge in transformStoriesRawToStoriesHash Jul 17, 2020
@blaine-stripe
Copy link

@shilman Your PR helped a bunch, especially around the stories hash, but it seems that 7 seconds are still being spent in configure on page load.

Screen Shot 2020-07-21 at 5 02 12 PM

@shilman
Copy link
Member

shilman commented Jul 28, 2020

Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.16 containing PR #11707 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman
Copy link
Member

shilman commented Jul 31, 2020

Yippee!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.20 containing PR #11740 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants