# speedscope: interactive flamegraph viewer for CPU and memory profiles

> A web-based visual debugger that turns raw profiling data into interactive flamegraphs. Supports profiles from Chrome, Firefox, Python, Ruby, Go, Java, and a dozen other language ecosystems. Run it locally via CLI or visit the live web version.

**jlfwong/speedscope** — 🔬 A fast, interactive web-based viewer for performance profiles.

- Repository: https://github.com/jlfwong/speedscope
- Website: https://www.speedscope.app
- Stars: 6,766 · Forks: 320
- Language: TypeScript
- License: MIT
- Published: 2026-09-22 · Updated: 2026-09-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/jlfwong-speedscope

## The problem: raw profiles are unreadable

A CPU profile dumps thousands or millions of stack samples to a file, showing which functions were on the call stack at each moment. Interpreting that directly is impossible: you need to group stacks, collapse recursion, sort by frequency, and visualize the relationships between caller and callee. Different profilers export in different formats (Chrome's JSON timeline, Python's pstats, Ruby's stackprof, Java's JFR files), so any tooling must handle a range of incompatible inputs. speedscope solves this by ingesting profiles from a wide range of language profilers and rendering them as interactive flamegraphs.

## Three views: Time Order, Left Heavy, and Sandwich

Once a profile loads, speedscope presents the data in three complementary views. The Time Order view (the default) renders call stacks left-to-right in the order they occurred in the profile, which is usually chronological. The horizontal axis represents the weight of each stack (typically CPU time), and the vertical axis shows the depth of the call stack. This view reveals how the application's behavior changes over time: first a database fetch, then data preparation, then serialization. The Left Heavy view groups identical stacks and sorts them so the heaviest child of each parent is positioned on the left. This view ignores time ordering and is useful when a function appears in thousands of samples interleaved with other work; seeing the top contributors becomes easier. The Sandwich view is a table in which you can click any function to see all its callers and callees as flamegraphs above and below the selected row, letting you drill into a single function's context.

## Supported profilers: 15+ language ecosystems

The README lists import formats for JavaScript (Chrome, Firefox, Safari, Node.js, Hermes for React Native), Ruby (stackprof, rbspy, ruby-prof), Python (py-spy, pyspeedscope, Austin, pyinstrument), PHP (phpspy and sj-i/php-profiler), Go (pprof), Rust (via flamescope), Java (async-profiler and Java Flight Recorder), Erlang and Elixir (via eflambe), native code (Instruments.app on macOS, perf on Linux), .NET Core, and Haskell (GHC). The project also accepts custom formats, with a wiki page documenting how to add support for a new profiler. This breadth means you can profile in your language of choice and use the same viewer for analysis, no matter whether you start with Node.js, Ruby, Python, or Go.

## Three ways to load profiles

The web version at www.speedscope.app accepts profiles by drag-and-drop or file browser. Profiles are never uploaded to any server; all processing happens in the browser. Alternatively, install speedscope as a global npm package with `npm install -g speedscope`, then run `speedscope /path/to/profile` to open the viewer in your default browser. This approach works offline and is convenient from the terminal. The third option is to download a self-contained archive from the GitHub releases page, unzip it, and open the included index.html in Chrome or Firefox. The README states that if you do not have npm or node installed, the archive is the fallback. For programmatic use, you can load a profile by appending a hash fragment to the URL like `#profileURL=[URL-encoded profile URL]&title=[URL-encoded custom title]`, though the server hosting the profile must have CORS configured.

## Navigation and keyboard control

The interface splits into a minimap at the top and a stack view below. In the minimap, scroll on either axis to pan, or click and drag to narrow your focus to a time range. In the stack view, scroll to pan, pinch to zoom on touch devices, or hold Cmd/Ctrl and scroll to zoom with a mouse. Double-click on any frame to fit it to the viewport. Clicking on a frame displays summary statistics about it, making it easy to inspect individual functions. Keyboard shortcuts cover all major actions: `+` and `-` zoom in and out, `0` resets to see the entire profile, `w`/`a`/`s`/`d` or arrow keys pan around, `1`/`2`/`3` switch between the three views, `r` collapses recursion, `Cmd+S`/`Ctrl+S` saves the profile, `Cmd+O`/`Ctrl+O` opens a new one, `n` and `p` navigate between profiles or threads, `t` opens the profile selector, and `Cmd+F`/`Ctrl+F` searches for functions by name. This comprehensive control scheme makes speedscope suitable for deep performance investigation from the keyboard.

## What the viewer requires and does not do

speedscope requires a profile in one of the supported formats; it does not generate profiles itself. You must use your language's built-in or external profiler to capture a profile first. The viewer does not store profiles or send them anywhere; processing is entirely local. The README does not document performance limits, so it is unclear whether a profile with hundreds of millions of samples or gigabyte-scale files will load efficiently. speedscope also does not attach to running processes to start profiling; it works only with profiles already captured and exported to a file.

## Alternatives: flamegraph, py-spy and profiler-specific tools

Brendan Gregg's FlameGraph is the original command-line tool for rendering flamegraph SVGs from profile data; it generates static images rather than interactive charts. py-spy is a profiler for Python that can output to speedscope format, so it integrates with speedscope but is language-specific. Many profilers ship their own viewers: Chrome DevTools for browser profiling, Python's cProfile and pstats, Ruby's ruby-prof, and JetBrains IDEs for JVM languages. speedscope's advantage is a single viewer that handles output from all of these, so you do not need to learn a different tool for each language. It is faster and more interactive than generating static SVGs and more polished than command-line tools.

## Only Chrome and Firefox from the last two years are supported

The package.json lists browserslist as "last 2 Chrome versions" and "last 2 Firefox versions", so the tool targets only modern browsers. It will not work in Internet Explorer, Safari versions older than a year or two, or other legacy browser environments. The last push to the repository was on 2026-05-15, about four months before today. Recent releases (v1.25.0 in December 2025, v1.24.0 in October 2025, v1.23.2 in October 2025) indicate active development with regular updates. The project includes a CODE_OF_CONDUCT and CONTRIBUTING guide, suggesting an open community. Built in TypeScript and built with esbuild and Jest for testing, speedscope is suitable for developers who need a modern JavaScript development environment.

## Conclusion

Use speedscope if you have raw CPU or memory profiles from any of the supported profilers and want to understand where time or memory is being spent. Skip it if you only have summary metrics or log files, not detailed call stacks. Start by exporting a profile from your language's built-in or external profiler, then drag it to www.speedscope.app or run `speedscope /path/to/profile` from the command line.

## FAQ

### How do I use speedscope?

Visit www.speedscope.app and drag a profile onto the page, or install via npm (`npm install -g speedscope`) and run `speedscope /path/to/profile`. The web version processes profiles entirely in the browser without uploading them.

### How is speedscope different from flamegraph?

Flamegraph is a command-line tool that generates static SVG images of flamegraphs. speedscope is interactive and web-based; you can zoom, pan, search, and switch between three views without regenerating the image.

### What profile formats does speedscope support?

The README lists support for profiles from Chrome, Firefox, Safari, Node.js, Hermes, stackprof, rbspy, ruby-prof, py-spy, pyspeedscope, Austin, pyinstrument, phpspy, pprof, flamescope, async-profiler, Java Flight Recorder, eflambe, Instruments.app, perf, .NET Core, and GHC. Custom formats can be added.

### Can I use speedscope offline?

Yes. You can install speedscope globally via npm and run it from the command line, or download a self-contained version from GitHub releases and open index.html in your browser. Both work without internet access.

### Does speedscope upload my profiles?

No. The web version at www.speedscope.app processes profiles entirely in your browser. Profiles are not sent to any server.

## Sources

- [jlfwong/speedscope on GitHub](https://github.com/jlfwong/speedscope)
- [License: MIT](https://github.com/jlfwong/speedscope/blob/main/LICENSE)
- [Project website](https://www.speedscope.app)
- [README](https://github.com/jlfwong/speedscope/blob/main/README.md)
- [Releases](https://github.com/jlfwong/speedscope/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/jlfwong-speedscope
