Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using crox --dir to merge all trace files results in file that is not viewable in chromium performance tools #236

Open
wmmc88 opened this issue Aug 31, 2024 · 1 comment

Comments

@wmmc88
Copy link

wmmc88 commented Aug 31, 2024

I get the following error when trying to open the resulting chrome_profiler.json file in performance tools: The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.

This only happens when merging all the traces via crox --dir. Single-crate generated file opens fine. Is there a max file size for opening the trace? the resulting merged chrome_profiler.json file I get is almost 5gb.

@bjorn3
Copy link
Member

bjorn3 commented Sep 1, 2024

I am pretty sure the javascript heap used by V8 is restricted to 4GB. As such the profiler is unable to read your profile as it is simply way too big. Note that even with a <100MB profile it can already take several minutes for the chrome profiler to load it. Using the flamegraph util would likely work much better. Or you can use the stack_collapse util and load it in eg https://speedscope.app. Both utils will destroy the exact time when each sample happened, keeping only the time between samples and stack, allowing two samples with identical stack to be merged. This should save on most of the space usedby the final profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants