Python cProfile – 7 Strategies to Speed Up Your App

Your Python app is slow? It’s time for a speed booster! Learn how in this tutorial. As you read through the article, feel free to watch the explainer video: Performance Tuning Concepts 101 I could have started this tutorial with a list of tools you can use to speed up your app. But I feel that this would create more harm than good because you’d spend a lot of time setting up the tools and very little time optimizing your performance. Instead, I’ll take a different approach addressing the critical…

Read More

Python cProfile – A Helpful Guide with Prime Example

Python comes with different profilers. If you’re new to performance optimization, you may ask: what’s a profiler anyway? A performance profiler allows you to monitor your application more closely. If you just run a Python script in your shell, you see nothing but the output produced by your program. But you don’t see how much bytes were consumed by your program. You don’t see how long each function runs. You don’t see the data structures that caused most memory overhead. Without those things, you cannot know what’s the bottleneck of…

Read More