Profiling Python code with memory_profiler

This page summarizes the projects mentioned and recommended in the original post on dev.to

Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. memory_profiler

    Monitor Memory usage of Python code

    What do you do when your Python program is using too much memory? How do you find the spots in your code with memory allocation, especially in large chunks? It turns out that there is not usually an easy answer to these question, but a number of tools exist that can help you figure out where your code is allocating memory. In this article, I’m going to focus on one of them, memory_profiler.

  2. Sevalla

    Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!

    Sevalla logo
  3. line_profiler

    Line-by-line profiling for Python (by pyutils)

    The memory_profiler tool is similar in spirit (and inspired by) the line_profiler tool , which I’ve written about as well. Whereas line_profiler tells you how much time is spent on each line, memory_profiler tells you how much memory is allocated (or freed) by each line. This allows you to see the real impact of each line of code and get a sense where memory usage. While the tool is quite helpful, there’s a few things to know about it to use it effectively. I’ll cover some details in this article.

  4. psutil

    Cross-platform lib for process and system monitoring in Python

    It uses the psutil library (or can use tracemalloc or posix) to access process information in a cross platform way, so it works on Windows, Mac, and Linux.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How to Monitor and Profile Python Code With Py-Spy for Performance Bottlenecks

    1 project | dev.to | 19 Apr 2025
  • Scalene: A high-performance, high-precision CPU, GPU, memory profiler for Python

    5 projects | news.ycombinator.com | 21 Oct 2024
  • Top 10 AI Tools Useful for DevOps Engineers

    2 projects | dev.to | 9 Sep 2024
  • Ask HN: C/C++ developer wanting to learn efficient Python

    4 projects | news.ycombinator.com | 10 Apr 2024
  • Minha jornada de otimização de uma aplicação django

    5 projects | dev.to | 13 Mar 2024

Did you know that Python is
the 2nd most popular programming language
based on number of references?