Answer the question
In order to leave comments, you need to log in
After rewriting from promises to asinks, did the time increase by x2?
There is a heavy operation for image resizing, optimization, envelope. In its current form on promises, the operation took 30 seconds. I tried to rewrite the aveites on async - the time doubled.
This is fine? Of course, I understand that this may be my crooked code, although there is nothing special there, for the performance to drop by half)
Answer the question
In order to leave comments, you need to log in
Vryatli. Rather, your code, as you put it, is a curve. I will give a short example
const data1 = await promise1();
const data2 = await promise1();
//....
Promise.all([
promise1(),
promise1()
])
.then(() => {
//....
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question