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

Hairy CPU profile stalls out UI #5

Closed
paulirish opened this issue May 10, 2024 · 2 comments
Closed

Hairy CPU profile stalls out UI #5

paulirish opened this issue May 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@paulirish
Copy link

Hey Roman! cpupro is badass. :D nice work
I just came across the project today. I'm excited to dig in and learn quite a few things.


But first thing I did was drag in a particularly heavy CPU profile. The tab gets totally hung (at least for 30sec).

Here's the repro: large-profile.cpuprofile.zip

I figured you'd want these cases. :)

You'll probably hear from me again soon. Cheers!

@lahmatiy
Copy link
Owner

@paulirish Thank you for your feedback and report. I appreciate it!

Yes, I'm very interested in such cases. This way, neither you, the users, nor I will encounter problems when analyzing any profile :)

I took a look at your profile. It uses parent instead of children for the call tree nodes. I've never seen such a structure in profiles from the V8 CPU profiler (.cpuprofile files), only in the Chromium Performance Profile files (as far as I can tell, CPP may contain children, parent, or both in ProfileChunks depending on the Chromium version, so cpupro supports all the cases). Therefore, cpupro expects children for .cpuprofile files, and the logic to transform parent into children is located only in CPP file processing. It seems that applying this logic to .cpuprofile as well files fixes the problem.

A patch is on the way.

@lahmatiy lahmatiy added the bug Something isn't working label May 10, 2024
@lahmatiy
Copy link
Owner

lahmatiy commented May 11, 2024

@paulirish The issue has been resolved. Please try your profile now. It takes only 0.4s for me.

I also discovered another issue with your profile. For some reason, the time from the last sample until endTime is significant. I suspect it's the time needed to conclude the profiling session or adjustments from excluding idle samples at the end. Regardless, this time is now excluded from the "Profiling time" used to compute time percentages. I've also updated the hint content to explain this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants