Latency for API call to a Python Function

dieter dieter at handshake.de
Wed Aug 30 02:58:57 EDT 2017


shazianusra at gmail.com writes:
> I have an issue with one piece of code in Python that when my API using Nginx/Uwsgi/EC2 AWS calls this function it causes latency.

In those cases, I proceed as follows:

 * structure the code in a way that it can be called in an interactive
   Python interpreter (if your Web framework does not directly
   support profiling)

 * use profiling (see the "profile" module in the Python library;
   there are also C variants (-> "cProfile", "hotspot").
   to find out where latency is introduced




More information about the Python-list mailing list