
Taming Callback Pyramids in AnuglarJS App Using Async/Await - prabhatjha
https://engineering.wootric.com/taming-callback-pyramids-in-our-angularjs-app-using-async/await
======
sharkenstein
Are there any performance penalizations because of this? The code for the
state machine looks very complex and I'm curious about what's the difference
in terms of performance between the pyramid model or the flat model.

~~~
hachibu
Author here. Yes, there is a trade-off. The resulting code is much bigger than
the original code because of this transformation. But, I think the trade-off
is worth it because it makes the code simpler to read, write and maintain. As
far as speed, I don't have any benchmarks but I don't think there is speed
penalty. It's mainly an issue of code size.

