Scalene
github.com
What it is
Scalene is a free, open-source profiler for Python programs that reports CPU, GPU and memory use and offers AI-powered optimization proposals. Its line- and function-level reports separate Python time from native-code and system time. Memory analysis shows per-line use, distinguishes Python from native allocations and flags lines with likely memory leaks. GPU profiling reports time on NVIDIA-based systems. Async profiling attributes wall-clock await time to the suspended coroutine line and reports mean and peak concurrent waiters. Its graphical interface can display stitched Python and native call stacks, memory flame charts and a timeline. Scalene is usable from the command line, a web-based GUI, a Visual Studio Code extension or Jupyter notebooks. The web interface processes profiles locally and works offline. For optimization suggestions, listed AI providers include Amazon Bedrock, Microsoft Azure, OpenAI and local models through Ollama. The project reports typical profiling overhead of no more than 10–20%, often less. Scalene is available for free under the Apache-2.0 license, with installations listed for macOS, Linux, Windows and Windows Subsystem for Linux 2.
Spec sheet
- Purpose
- Scalene profiles Python programs for CPU, GPU, and memory use and provides AI-powered optimization proposals.Read 4 Oct 2026 · github.com
- Support
- The project links to a Scalene community Slack for community discussion.Read 4 Oct 2026 · github.com
- License
- The repository identifies its license as Apache-2.0.Read 4 Oct 2026 · github.com
- AI providers
- For optimization suggestions, Scalene lists Amazon Bedrock, Microsoft Azure, OpenAI, and local models via Ollama as supported providers.Read 4 Oct 2026 · github.com
- Async profiling
- Async profiling attributes wall-clock await time to the line where a coroutine is suspended and reports mean and peak concurrent waiters.Read 4 Oct 2026 · github.com
- Detailed profiling
- It reports performance at line and function level and separates Python time from native-code and system time.Read 4 Oct 2026 · github.com
- GPU support
- GPU profiling reports time on NVIDIA-based systems.Read 4 Oct 2026 · github.com
- Install platforms
- The project lists macOS, Linux, Windows, and Windows Subsystem for Linux 2 as supported installation platforms.Read 4 Oct 2026 · github.com
- Interfaces
- Scalene can be used from the command line, a web-based GUI, a Visual Studio Code extension, or Jupyter notebooks.Read 4 Oct 2026 · github.com
- Local processing
- The web interface processes profiles locally and works offline; the project says API keys passed from environment variables are sent only to the local browser session and are never written into the HTML file.Read 4 Oct 2026 · github.com
- Memory analysis
- It reports per-line memory use, distinguishes Python from native allocations, and identifies lines with likely memory leaks.Read 4 Oct 2026 · github.com
- Performance overhead
- The README says profiling overhead is typically no more than 10–20%, and often less.Read 4 Oct 2026 · github.com
- Stack views
- Its GUI can display stitched Python and native call stacks, memory flame charts, and a timeline.Read 4 Oct 2026 · github.com
- Windows note
- Starting with Scalene 2.0, Windows supports full memory profiling; troubleshooting may require the Visual C++ Redistributable.Read 4 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Separates Python time from native and system time
- Identifies lines with likely memory leaks
- Offers command-line, GUI, extension and notebook interfaces
- Web interface processes profiles locally and works offline
Limits
- GPU profiling reports time on NVIDIA-based systems
- Windows troubleshooting may require the Visual C++ Redistributable
Who it suits
Scalene suits Python developers who need line-level CPU, GPU or memory profiling through a command line, GUI, editor extension or notebook. Its local web interface may fit users who need to analyze profiles offline.
Verdict
Scalene offers detailed Python profiling across CPU, memory and supported GPU use, with several interface options. Windows users may need the Visual C++ Redistributable for troubleshooting.
Where Specifiction places it
- Profiling Software#17 of 297.6