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

Performance issues with storybook 8/vite 5? #37

Closed
viveleroi opened this issue Sep 19, 2024 · 3 comments
Closed

Performance issues with storybook 8/vite 5? #37

viveleroi opened this issue Sep 19, 2024 · 3 comments

Comments

@viveleroi
Copy link

We upgraded from storybook 7 to 8 a few months and ago and the live reload time when storybook is open absolutely tanked. With v7 it was almost immediate, < 1 second. With v8, it's taking upwards of 20 seconds. Live reload in our actual app works fine, so it's not a vite or typescript problem as far as we can tell.

All we know so far is that the issue happens when we use reactDocgen: 'react-docgen-typescript' but reactDocgen: 'react-docgen' works fine (outside of missing all types/props). So it's only an issue with storybook, and either this vite plugin or react-docgen-typescript itself.

I'm not clear on whether this plugin was used prior to v8 but judging by our yarn.lock file, it was.

I've asked on the storybook discussions for more help in diagnosing what the core issue would be, but got no reply.

Storybook 8.2.9
Vite 5.3.1
Typescript 5.4.5

What would you suggest we try to better narrow the cause of the delays?

@viveleroi
Copy link
Author

Ok on further investigation this is an issue in 0.3.1 of this dependency, but not 0.3.0. Forcing 0.3.0 in our project on storybook 8.3.2 resolves the speed problems.

storybookjs/storybook#28269

@joshwooding
Copy link
Owner

This should have been fixed by #38. Could you test it and see if it helps?

@viveleroi
Copy link
Author

Testing v4.1 does solve the hmr performance issue, but cold start times for storybook 8.3.4 are worse. After two tests I would estimate about 2-3x slower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants