You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the number of React components in my project grew, I noticed a performance issue similar to what is discussed in styleguidist/react-docgen-typescript#112: Creating a new Typescript program (ts.createProgram) when transforming each file is expensive.
As the number of React components in my project grew, I noticed a performance issue similar to what is discussed in styleguidist/react-docgen-typescript#112: Creating a new Typescript program (ts.createProgram) when transforming each file is expensive.
I loosely adapted https://github.com/strothj/babel-plugin-react-docgen-typescript/blob/0b72d214444bf7a48ec22637654c5bee0eaad26f/src/index.ts to re-use the TypeScript program, and got big perf gains.
It might be possible to adapt this babel plugin. Hope this info could be helpful.
./docgen.js
babel.config.js
Before, it was about 40 seconds. Nearly a full order of magnitude improved.
The text was updated successfully, but these errors were encountered: