M
M
Max Payne2019-04-09 18:34:51
Python
Max Payne, 2019-04-09 18:34:51

In what cases will there be no difference between synchronous code and asynchronous?

I have a small tornado project that completes a fully synchronous request in 300-400 milliseconds. There is both work with the database and calls to third-party APIs. I spent some time, rewrote everything in an asynchronous style: all requests to third-party APIs and services, switched to an asynchronous engine for the database and wrote my own small ORM for it too, refactored some parts of the code, added caching - but, for some reason, request time remains the same. That is exactly the same 300-400 milliseconds. That is, it has not decreased at all. I'm testing on a local server using Insomnia.
So what could be my mistake? What could I be missing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-04-09
@dmtrrr

Can Insomnia do load testing?
Create a load with parallel queries (at least with ab) and compare.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question