#100DaysOfCode in Python Transcripts
Chapter: Days 49-51: Measuring performance
Lecture: Your turn: Day 3
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Third day, it's time to improve the performance of your application. You've chosen it. You've gone through and found out where it's slow.
0:07
So what you're going to do is focus one by one on the five slow functions and try to make it faster. Look at it, try to understand where it's slow,
0:15
and if you can change something about the way that it works, right, in our example we said, well, we're parsing the CSV and we're actually converting
0:22
12 columns of data and actually we're only using four. Let's just throw away the other eight columns because we're never using them,
0:29
and that conversion is entirely wasteful. We'll look for things like that. Go through each one of the five functions, change 'em one at a time,
0:37
rerun the profiler compared against your times from the previous day, and if it gets better, keep that change. If it actually gets slower, forget it.
0:45
Just leave it alone or try something different. All right, that's it. So now you should have an app that's faster.
0:50
Hopefully, much faster than it was before and you now have this new skill with profiling to understand the performance of Python applications.