shazianu...@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 -- https://mail.python.org/mailman/listinfo/python-list