long processing due to async


Need some help -
I have the following page:

with the attached code.
The code is working fine, and the result is good, but it takes almost 30 seconds of processing.
I think it’s because of the ‘async’ functions, and I need some help to make it work faster.
I tried to play with all the ‘wait’, but it didn’t work. the ‘for’ loop runs too fast, and the result ends with false data.

many many thanks:)