#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
0:02 the performance of your application.
0:03 You've chosen it.
0:04 You've gone through and found out where it's slow.
0:06 So what you're going to do is focus one by one
0:08 on the five slow functions and try to make it faster.
0:12 Look at it, try to understand where it's slow,
0:14 and if you can change something
0:16 about the way that it works, right,
0:18 in our example we said, well,
0:19 we're parsing the CSV and we're actually converting
0:21 12 columns of data and actually we're only using four.
0:24 Let's just throw away the other eight columns
0:26 because we're never using them,
0:28 and that conversion is entirely wasteful.
0:31 We'll look for things like that.
0:32 Go through each one of the five functions,
0:34 change 'em one at a time,
0:36 rerun the profiler compared against
0:38 your times from the previous day,
0:40 and if it gets better, keep that change.
0:43 If it actually gets slower, forget it.
0:44 Just leave it alone or try something different.
0:46 All right, that's it.
0:47 So now you should have an app that's faster.
0:49 Hopefully, much faster than it was before
0:52 and you now have this new skill
0:54 with profiling to understand
0:55 the performance of Python applications.