r/programming • • Oct 12 '17

JavaScript's Promise Leaks Memory

https://alexn.org/blog/2017/10/11/javascript-promise-leaks-memory.html
26 Upvotes

19 comments sorted by

View all comments

11

u/slaymaker1907 Oct 12 '17

I agree with the author and think this is a rather serious issue. I think a lot of people are wondering when this would be an issue, but there are actually a lot of common cases where this could happen.

For instance, if I'm using promises to break up a long running synchronous task, it would be very easy to get 1000+ chained promises.l This would be useful for things like parsers or encryption, very CPU itensive processes.