Content
@
https://opensea.io/collection/dev-21
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
3 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
Gabriel Ayuso
@gabrielayuso.eth
Server-wise, it might still be fine since the server can still handle other requests while the other ones are still just waiting for I/O but your requests are going to be slow. Then the clients will just be there waiting too with cute little spinners.
0 reply
0 recast
1 reaction