storybook: Regression: Slowed Builds with react-docgen-typescript

Describe the bug

This is a regression from the resolved state of #6430. It may be an issue with RDTL, perhaps not. They have https://github.com/styleguidist/react-docgen-typescript/issues/112 still open.

In that bug, @strothj and @denieler were able to improve react-docgen-typescript-loader to reuse the parser instance to improve performance. I’ve updated our dependencies to 5.1.11 and there has been a regression.

Screen Shot 2019-09-04 at 4 19 02 PM

If I comment react-docgen-typescript-loader out, I get much faster build times:

Screen Shot 2019-09-04 at 4 29 26 PM

To Reproduce Steps to reproduce the behavior:

  1. Enable react-docgen-typescript-loader for .tsx? files, as recommended.
  2. Have a repo with 10+ stories.
  3. See slow build time.

You can view our config here.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 21 (16 by maintainers)

Most upvoted comments

I finished migrating a project from 5.3 to 6.0 and I don’t have problem with the TS increased times anymore. The difference is amazing, from ~3 minutes to ~21 seconds:

image

@The-Code-Monkey yes. we are recommending a new configuration in 6.0 and will be updating the docs this week.

@clintandrewhall what do you think about #7942 - loading prop tables from file and generating prop tables manually only when interfaces are changed. Linked in there is also my custom scripts. Another option i was considering to create a new webpack react docgen plugin that will resemble more the webpack uglify js plugin with caching and parallel execution options.