Closed zdila closed 5 years ago
I can confirm that as well. Cold start of tsc
still takes too much of the resources and time.
Probably related to this, I noticed when I changed all my reducers from standard switch case to createReducer, compiler typechecking and autocomplete (in both VSCode and IntelliJ) slowed down noticably to the point where it's painful to use
@mmalicki that was actually also my case
Thanks for the reproduction case 👍. I have confirmed an issue and will be working on that.
@issuehunt has funded $140.00 to this issue.
I can also confirm the issue. Thanks so much for looking into it!
PR is ready, now it's infinitely scalable. will release a new version tomorrow.
@zdila You can test it now using the following in your project to confirm:
npm i piotrwitek/typesafe-actions##168
@piotrwitek thanks, but with npm i piotrwitek/typesafe-actions##168
there is no more dist
in node_modules/typesafe-actions
.
@zdila you can build the project locally and copy the dist folder or wait for me to release under the next branch in a few hours
Published on npm as @next
@piotrwitek has rewarded $98.00 to @piotrwitek. See it on IssueHunt
Shouldn't that be released as v4.5.0 since it's a major performance issue?
There is a breaking change in the API and I'm respecting semver. But I might consider it if that is something critical to the majority of the users.
After upgrading to @next release, project hangs on tsc again with memory leak at the end (19x createAsyncAction, 1x createStandardAction).
4.4.2
is working fine.
What can I do to provide you more details?
In my case typesafe-actions@next
works now fine on my project. Thanks Piotr.
@hsz take a look at a great reproduction example from @zdila above and try to isolate the issue in your project in the same way. Only this way we can confirm the issue is on our end and not within your application setup.
Description
Cmpiling application with couple of reducers (~20) and action creators (~200) takes 2 GB RAM and requires passing
--max-old-space-size
to node when invokingtsc
. Before fixing #164 it was much worse but it is still unuseable.Steps to Reproduce
Steps to reproduce the behavior:
npm i
node --max-old-space-size=8192 ./node_modules/.bin/tsc --diagnostics
Expected behavior
Compilation of such project should be a piece of cake ;-)
Suggested solution(s)
Improve types or identify bug in TypeScript.
Project Dependencies
Environment (optional)
IssueHunt Summary
# # # # [ < i m g s r c = ' h t t p s : / / a v a t a r s 0 . g i t h u b u s e r c o n t e n t . c o m / u / 7 3 9 0 7 5 ? v = 4 ' a l t = ' p i o t r w i t e k ' w i d t h = 2 4 h e i g h t = 2 4 > p i o t r w i t e k ] ( h t t p s : / / i s s u e h u n t . i o / u / p i o t r w i t e k ) h a s b e e n r e w a r d e d . ### Backers (Total: $140.00) - [ issuehunt](https://issuehunt.io/u/issuehunt) ($140.00) ### Submitted pull Requests - [#171 #168](https://issuehunt.io/r/piotrwitek/typesafe-actions/pull/171) --- ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/piotrwitek/typesafe-actions/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)