Python Memory Management and Tips Transcripts
Chapter: Investigating memory usage
Lecture: Concept: Line by line memory with memory_profiler

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's just review how we did line by line profiling with Memory Profiler. We started out by finding the function that we want to look at
0:08 that's creating the memory, or causing the memory problem, and we put an "@profiler" decorator out of that library on it.
0:15 And then we go and run Python, the one out of the Virtue environment, -m memory_profiler and then just the script and any arguments that it
0:24 might take. It runs and cranks on that for a while and boom, out comes some
0:29 nice results showing how each line added to, or did not add to, how much memory was being used.

Talk Python's Mastodon Michael Kennedy's Mastodon