Skip to content
0:00 / 0:00

#promises#node.js#async

Broken Promises - James Snell, NearForm

node.js

43K subscribers • 9 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • Presented by James Snell, NearForm
  • An opinion. It argues one side of a question engineers disagree on.

Advanced. Deep dive for people who know the field.

19K views6 years ago3 recommendations

Programming languagesSystems programmingJavaScriptPerformance and optimizationConcurrency and parallelism

James Snell discusses how Promises are commonly abused in Node.js, why they slow down applications, and how to use them correctly.

Speakers: James Snell When a customer comes to us with a complaint that their code is running slowly, our first question has become, "Are you using Promises?". When they predictably tell us yes, our response has become, "You're likely using them wrong". In this talk, we'll discuss the various ways Promises are abused. We'll talk about why that ends up needlessly slowing Node.js applications down. And we'll talk about how to use Promises correctly, the way they were intended to be used. Expect code, opinions, and colorful charts.

Why it's here

3 people recommend this

What people say. Highly recommended as a deep dive into Promise performance and best practices in Node.js.

Moments people linked to

u/flooronthefourin r/node • Recommends

On “How much loop is ok in node ?”

You might want to check out this video on how using too many promises can lead to poor performance: link to this video

u/bselectin r/node • Recommends

On “Return await or return promise”

This is probably the best deep dive into promise best practices around. link to this video

u/shivawuin r/node • Recommends

On “What are your best Node tips/tricks/discoveries from 2021?”

It’s a bit complex to explain, but check this out: link to this video

u/kliefadosin r/node • Mentions

Promise question Hello everyone, recently i saw a talk about promises in js. The talk was about bad practises using Promises. I found the repo on github, which has the used examples in the talk. Now im not sure how to use promises in a loop properly, without blocking the event loop. If you have some suggestions how to improve this example code, that its not blocking the event loop to long Here is the github repo, with the examples. https://github.com/jasnell/broken-promises/tree/master/Part1/Loops and here is the talk with the right position [video
9View on Reddit