Content
@
0 reply
0 recast
2 reactions
Gabriel Ayuso
@gabrielayuso.eth
Since async functions just look like regular function calls, it's easy to just add an "await" before calling them and treat them as any other function in your flow. This is not ok. You're essentially telling your CPU to do nothing, just chill, until that function returns. You should strive to put your CPU to work so you figure out how to minimize the wait time.
2 replies
0 recast
6 reactions
//trip
@heytrip.eth
of course i agree with this conceptually, isnt the annoying part of single-threaded JS that its actually pretty good (in a dumb way) at maxing out what the CPU is doing all the time?
1 reply
0 recast
0 reaction
llamafacts
@llamafacts.eth
Any concrete examples? I mean you're right but this only applies when you need to execute multiple async tasks simultaneously
0 reply
0 recast
0 reaction