-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Summary:
When attempting to load and view a large profile file (~375 MB) generated by py-spy, the browser tab crashes with an "Out of Memory" error. This occurs specifically when trying to render the view for the largest thread in the profile.
Steps to Reproduce:
- Generate a large profile file. (In my case, a 375 MB speedscope file was generated using
py-spyover a ~48-hour period). - Navigate to
https://www.speedscope.app/. - Click "Browse..." and select the 375 MB file.
- After the file is parsed, click on the largest thread in the profile selector dropdown to attempt to view it.
- The browser tab hangs for a moment, then crashes.
Expected Behavior:
The flamegraph or time-order view should render for the selected thread, even if it is slow or requires some level of aggregation to be usable. The browser tab should not crash.
Actual Behavior:
The Chrome tab crashes, displaying the "Aw, Snap!" error page.
Error code: Out of Memory
Environment:
- Browser: Google Chrome Version 139.0.7258.128 (Official Build) (64-bit)
- Operating System: Windows 11
- Speedscope Version:
speedscope.appaccessed on [2025-08-25]
Additional Context:
The profile file is quite large due to a long-running process analysis. I understand that this is an edge case, but it would be great if speedscope could handle these larger files more gracefully.
I am willing to share the profile file privately if it would help with debugging.
Potential Solutions / Discussion:
Some ideas that come to mind:
- Data Aggregation/Downsampling: Could speedscope dynamically reduce the sampling resolution for very large data sets before rendering?
- Detail just for selection: Only rendering a selected portion of the flamegraph in detail