After reading The Node.js Event Loop, Timers, and process.nextTick()...
Q. I write a lot of promise chains in applications. How is a promise chain executed? Is it performant?
The experiment shows:
- Chained promises are eagerly executed before proceeding to the next phase.
- Promise chaining is a bit slower than synchronous execution, but not too much.
- (Also, chained
process.nextTick()
are eagerly executed before proceeding to the next phase.)