JavaScript Quick Tip Fetch in Parallel

preview_player
Показать описание
One gotcha that comes up frequently and has a serious impact on application performance is the tendency to accidentally fetch data in serial that could have been fetched in parallel. Don't just drop an await in everywhere you use promises. Instead, think about the fetching dependencies. If you're fetching more than one thing, make sure you fetch in parallel whenever you can. This will make a huge difference in your application's performance.

Resources for remote software developers:

---

He enjoys a remote lifestyle with the most beautiful woman in the world.

#JavaScript #Code #SoftwareEngineering
Рекомендации по теме
Комментарии
Автор

Good and straightforward content. Love it!

felipezarco
Автор

I was first introduced to your work by watching your video "Classical inheritance is I've been learning JS, and almost every tutorial or lesson I go to always introduces classes first.
I keep going to your article and video all the time. Thank you for your work. Love these little tips.

eyjaythejansenite
Автор

Thanks for the tip. I like how you went straight to the point.

franco-cespi
Автор

Thank you! Love your gpt-3 interview and hi from New Zealand!

mihaidinul
Автор

thank you elliot
didnt know about this

rdrglpzcnt
Автор

Damn, this is so obvious in hindsight. Feel silly for not doing this before.

hynjus
Автор

Straight forward and really helpful. Appreciate it!

christazos
Автор

Of course the real answer to the riddle is that one should request everything needed in one request.

gabydewilde
Автор

That's my fav. interview question but with slight twist(error cases). Which can be handled by allSettled, but I like custom implementation untill the function becomes common.

sujitkumarsingh
Автор

That's the problem with async/await. It makes people think of promises as sync calls and use them in a blocking way.

JuanPablodelaTorre
Автор

Learn something new everyday! Thanks. I wonder why call in the first example don't run in parallel...

Anonymous-vhkp
Автор

:-) when possible, start promises asap and await only when you *need* to use the data

rolfnoduk