Open zdila opened 3 years ago
We are also hitting this. We have approximately 220 actions and have noticed that complication times are pretty extreme when compiling. Unfortunately, I don't think this really has anything to do with typesave-actions. https://github.com/microsoft/TypeScript/wiki/Performance#preferring-base-types-over-unions is probably describing the problem here.
Description
If we use in our application
RootAction
as is recommended in the documentation, then TS compilatin is extremly slow and intellisense in VS Code becomes near-unuseable.It is reproducible with the project https://github.com/FreemapSlovakia/freemap-v3-react (just clone it and do
npm i && DEPLOYMENT=www time ./node_modules/.bin/webpack
, but currently it has a workaround you can see below).A workaround is to replace the above code with this:
The workaround reduces compilation time from 5:40 to 0:35 and makes vscode intellisense fast.