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

[Tracking] Core package consolidation #27209

Closed
38 of 40 tasks
shilman opened this issue May 21, 2024 · 2 comments · Fixed by #27039
Closed
38 of 40 tasks

[Tracking] Core package consolidation #27209

shilman opened this issue May 21, 2024 · 2 comments · Fixed by #27039
Assignees
Labels

Comments

@shilman
Copy link
Member

shilman commented May 21, 2024

RFC: #27207
PR: #27039

Stage 1: The technical bits

Consolidation

CI

Metrics:

Storybook performance and size metrics

mealdrop before after
Storybook startup time 343ms (manager) and 315ms (preview) 314ms (manager) and 324ms (preview)
Storybook build time 104ms (manager) and 10.92s (preview) 97ms (manager) and 11.93s (preview)
Storybook build time (--test) 91 ms (manager) and 4.28s (preview) 85 ms (manager) and 4.72s (preview)
Storybook static dir size 21M 22M
node_modules size 523M 533M
node_modules install time 15,83s 13,02s
VTA hot/cold builds 1m24s 1m24s
packages added +446 +325
React + Vite starter (Yarn) before after
Storybook startup time 199ms (manager) and 278ms (preview) 197ms (manager) and 320ms (preview)
Storybook build time 104 ms (manager) 3.31s (preview) 114 ms (manager) and 4.04s (preview)
Storybook build time (--test) 105ms (manager) and 3.33s (preview) 98ms (manager) and 3.72s (preview)
Storybook static dir size 6.9M 7.7M
node_modules size 280M 241M
node_modules install time 10.86s 6.44s
packages added +635 +493
Nextjs sandbox (Yarn) before after
Storybook startup time 192ms (manager) and 2.79ms (preview) 195ms (manager) and 3.05ms (preview)
Storybook build time 104ms (manager) and 7.14s (preview) 112 ms (manager) and 7.68s (preview)
Storybook build time (--test) 106ms (manager) and 1.83s (preview) 96ms (manager) and 1.96s (preview)
Storybook static dir size 8.9M 11M
node_modules size 579M 553M
node_modules install time 10.59s 9.73s
packages added +825 +716

Storybook Monorepo metrics

before after
monorepo compile time (dev) 49s 30s
monorepo compile time (prod) 2m 30s 2m 11s

Storybook initialization metrics

For storybook init times, we created a react-vite project using npx create-vite@latest then we ran the following commands (about 10 times):

# Storybook latest (8.1.10)
export CI=true && git checkout . && git clean -xdf && rm -rf $(npm get cache)/_npx && time npx storybook@latest init --yes

# Storybook canary  CPC (0.0.0-pr-27039-sha-65814b9a)
export CI=true && git checkout . && git clean -xdf && rm -rf $(npm get cache)/_npx && time npx [email protected] init --yes

And from the results, we collected the fastest possible results from all runs.

before after
init time 28,33s 23,10s
Storybook startup time 190ms (manager) and 261ms (preview) 189ms (manager) and 311ms (preview)
Storybook build time 98ms (manager) and 3.78 s (preview) 90ms (manager) and 4.15ms (preview)
Storybook build time (--test) 123 ms (manager) and 1.38 s (preview) 92ms (manager) and 1.65s (preview)
Storybook static dir size 4.9M 5.6M
node_modules size 275M 222M
node_modules install time (npm) 3.4s 2.5s
node_modules install time (pnpm) 3.0s 2.3s
time nr task compile -s install --no-link --debug

Testing

Documentation

Metrics

Optionals

  1. build ci:normal
    ndelangen
  2. build
    ndelangen
  3. build ci:daily
    valentinpalkovic

Follow up

@shilman shilman converted this from a draft issue May 21, 2024
@valentinpalkovic valentinpalkovic changed the title Core package consolidation [Tracking] Core package consolidation Jun 3, 2024
@shilman shilman assigned valentinpalkovic and unassigned yannbf Jun 5, 2024
@valentinpalkovic valentinpalkovic removed their assignment Jun 18, 2024
@ndelangen
Copy link
Member

@shilman @vanessayuenn I'm guessing we won't be writing a blogpost then, if we want @storybook/core to be "private"?

I scrapped the Update the addon toolkit with the changes. work item.

Do we need a proper README.md for @storybook/core?

@shilman
Copy link
Member Author

shilman commented Jun 19, 2024

@ndelangen Correct--no blog post for this. Yes to README.md. It should document, at a high level, what the package is for and what people should do with it (at the moment, install it and that's about it). My $.02!

@ndelangen ndelangen linked a pull request Jun 26, 2024 that will close this issue
18 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in Storybook Roadmap Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants