This is more of a guess than an issue but I suspect the reason why the Javascript version is so much slower is because it's single threaded. Even though the Promise.all(...) execution queues everything in parallel, it's still only being processed serially since it's single core.
Contrast this with the aiohttp.TCPConnector(limit=1000) which really will, presumably, create 1000 concurrent processes.
One way to speed things up is to put the Javascript requests into a Web worker to actually create concurrent executions.
Again, this is an educated guess so I could be totally off base.
This is more of a guess than an issue but I suspect the reason why the Javascript version is so much slower is because it's single threaded. Even though the
Promise.all(...)execution queues everything in parallel, it's still only being processed serially since it's single core.Contrast this with the
aiohttp.TCPConnector(limit=1000)which really will, presumably, create 1000 concurrent processes.One way to speed things up is to put the Javascript requests into a Web worker to actually create concurrent executions.
Again, this is an educated guess so I could be totally off base.