typesafe-actions: High memory consumption
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 invoking tsc
. Before fixing #164 it was much worse but it is still unuseable.
Steps to Reproduce
Steps to reproduce the behavior:
- Download and unpack https://drive.google.com/file/d/1FUzk5NeRfxUvwd4eXCxIFcb7Scmvh9D4/view?usp=sharing
- run
npm i
- run
node --max-old-space-size=8192 ./node_modules/.bin/tsc --diagnostics
- See the result
Expected behavior
Compilation of such project should be a piece of cake π
Suggested solution(s)
Improve types or identify bug in TypeScript.
Project Dependencies
- Typesafe-Actions Version: 4.4.1
- TypeScript Version: 3.5.2
- tsconfig.json: included in the tgz
Environment (optional)
- OS: Debian Linux Buster
- Node Version: 12.4.0
- Package Manager and Version: npm 6.9.0
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 ($140.00)
Submitted pull Requests
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 16 (6 by maintainers)
Commits related to this issue
- #168 (#171) * Updated createReducer api with new method handleType * Updated API docs * Released 5.0.0-0 — committed to piotrwitek/typesafe-actions by piotrwitek 5 years ago
- #168 (#171) * Updated createReducer api with new method handleType * Updated API docs * Released 5.0.0-0 — committed to piotrwitek/typesafe-actions by piotrwitek 5 years ago
- #168 (#171) * Updated createReducer api with new method handleType * Updated API docs * Released 5.0.0-0 — committed to piotrwitek/typesafe-actions by piotrwitek 5 years ago
- #168 (#171) * Updated createReducer api with new method handleType * Updated API docs * Released 5.0.0-0 — committed to piotrwitek/typesafe-actions by piotrwitek 5 years ago
Thanks for the reproduction case π. I have confirmed an issue and will be working on that.
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
In my case
typesafe-actions@next
works now fine on my project. Thanks Piotr.@piotrwitek thanks, but with
npm i piotrwitek/typesafe-actions##168
there is no moredist
innode_modules/typesafe-actions
.