Contribute Media
A thank you to everyone who makes this possible: Read More

Python Website is Slow? Think Again!

Translations: en


As a Python avid user, we read a lot of articles that describe Python as a slow, interpreted language. At a certain point, some people start to blame the language itself for performance problems and consider to migrate their codebase to other languages. However, the success story of Instagram in handling four hundred million users has shown us that Python is not the bottleneck, but our codebase is.

In this talk, the speaker will share a tale of improving Python website performances in medium-sized enterprise (serving million users) that I’m currently working at. In a year, we finally achieved speed improvement from the average response time of 400 ms to 150 ms per request and we could save around $100k per year in AWS EC2 instance provisioning, which is around 60% of total cost.

Several key points that we have learned from our development process includes:

  • Tracking database queries with Python decorator will reduce number of unnecessary queries
  • Using an async framework does not guarantee your codebase is implementing it correctly
  • Default configured third-party library is not always suitable for all use cases
  • Utilizing memory profiler and pdb properly will help you in pinpointing application bottleneck
  • Python for-loops vs generators
  • And several other common pitfalls

Expected level of audience: This talk is mainly targeted for beginner to intermediate web developer who are interested in improving the cost- performance of their web applications. After listening to this talk, the audiences are expected to understand that good coding practices (e.g.: implement asyncio correctly, track number of DB queries with decorators, etc) will make their web application a lot faster and cut down operational costs by a large margin.

Feedback form:

in __on Sunday 5 May at 12:30 **See schedule**

Improve this page