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

React-Vite: Downgrade react-docgen-typescript plugin #29184

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

shilman
Copy link
Member

@shilman shilman commented Sep 23, 2024

Closes #28269

What I did

Fix HMR performance issue by downgrading the react-docgen-typescript Vite plugin

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

Upgrade repro in #28269 to canary (have not tested)

🦋 Canary release

This pull request has been released as version 0.0.0-pr-29184-sha-d5ba8e56. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-29184-sha-d5ba8e56
Triggered by @shilman
Repository storybookjs/storybook
Branch shilman/28269-downgrade-typescript-docgen
Commit d5ba8e56
Datetime Mon Sep 23 10:08:21 UTC 2024 (1727086101)
Workflow run 10992103485

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=29184

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.4 MB 77.4 MB 6 B 2.01 0%
initSize 162 MB 162 MB 1.76 kB -0.16 0%
diffSize 85 MB 85 MB 1.75 kB -0.36 0%
buildSize 7.57 MB 7.57 MB 0 B -0.04 0%
buildSbAddonsSize 1.66 MB 1.66 MB 0 B 0.1 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.34 MB 2.34 MB 0 B - 0%
buildSbPreviewSize 352 kB 352 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.55 MB 4.55 MB 0 B 0.1 0%
buildPreviewSize 3.02 MB 3.02 MB 0 B -0.73 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 14s 19.4s 5.4s 0.65 27.9%
generateTime 21.1s 19.3s -1s -831ms -0.7 -9.5%
initTime 17s 15.2s -1s -818ms -0.88 -11.9%
buildTime 10.6s 10.6s -20ms -0.68 -0.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.7s 8.4s 1.6s 2.19 🔺20%
devManagerResponsive 4.4s 5.7s 1.2s 2.86 🔺22.1%
devManagerHeaderVisible 921ms 1s 95ms 1.76 🔺9.4%
devManagerIndexVisible 968ms 1s 98ms 1.77 🔺9.2%
devStoryVisibleUncached 1.2s 1.2s 16ms -0.48 1.3%
devStoryVisible 968ms 1s 86ms 1.67 🔺8.2%
devAutodocsVisible 794ms 858ms 64ms 1.19 7.5%
devMDXVisible 788ms 878ms 90ms 2.14 🔺10.3%
buildManagerHeaderVisible 891ms 753ms -138ms -0.6 -18.3%
buildManagerIndexVisible 936ms 759ms -177ms -0.76 -23.3%
buildStoryVisible 934ms 796ms -138ms -0.67 -17.3%
buildAutodocsVisible 830ms 771ms -59ms 0.48 -7.7%
buildMDXVisible 782ms 668ms -114ms -0.49 -17.1%

Greptile Summary

This pull request downgrades the @joshwooding/vite-plugin-react-docgen-typescript dependency to address a performance issue with Hot Module Replacement (HMR) in Storybook's React-Vite framework.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Sep 23, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d5ba8e5. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Sep 23, 2024
@kasperpeulen kasperpeulen merged commit b23e84a into next Sep 23, 2024
64 of 69 checks passed
@kasperpeulen kasperpeulen deleted the shilman/28269-downgrade-typescript-docgen branch September 23, 2024 12:53
storybook-bot pushed a commit that referenced this pull request Sep 23, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
storybook-bot pushed a commit that referenced this pull request Sep 23, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
storybook-bot pushed a commit that referenced this pull request Sep 23, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
…pescript-docgen

React-Vite: Downgrade react-docgen-typescript plugin
(cherry picked from commit b23e84a)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Sep 24, 2024
@joshwooding
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder-vite ci:normal dependencies patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch performance issue react typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: fast refresh is very slow when using react-docgen-typescript since v8.1.0
3 participants