getFlameGraphTiming is slow
See original GitHub issueSTR:
- View this profile.
- Then change the time selection.
- It’s really slow.
Here is a recording of that slowness, with getFlameGraphTiming
focused.
https://perfht.ml/2p0EXzK
Specifically the call tree method getDisplayData
is the culprit in being the most slow. The results are already cached, but I think we need to computer fewer things, or provide another avenue to get that data that isn’t so expensive.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
FlameGraphs: Understand where your program is spending time
Nevertheless, I think this is a great tool and it should be the first tool to use when trying to figure out why...
Read more >addr2line taking an exorbitant amount of time #74 - GitHub
Hi, I've recently been using flamegraph on a Linux system and once the recording is done it takes an extremely long time. It...
Read more >Identify Performance Issues with Flame Graphs
Response times will be slow (often surpassing timeouts you have), active handles will be high, and CPU will spike. If the problem is...
Read more >Off-CPU Flame Graphs - Brendan Gregg
This is the format that my FlameGraph software takes as input. Here are the steps for generating a file I/O time flame graph,...
Read more >Making slow Rust code fast | patrickfreed's blog
Performance tuning using Criterion.rs and flamegraphs. ... find time: [55.905 ms 56.127 ms 56.397 ms] change: [+0.3049% +0.8337% +1.4904%] ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah yes, thanks @brisad! Definitely you should use a simpler method instead of
getDisplayData
. In the profile’s inverted tree,extractFaviconFromLibname
stands out right aftergetChildren
so I think it’s a worthwhile optimization.This is much much better than it was, but we can still feel a slowness sometimes. Is it good enough ?
I took a new profile: https://perfht.ml/2MDBUvf The most time is spent now in
getFlameGraphTiming
itself. I think it will be difficult to look further until we get the per-line information. Or maybe as I suggested in https://github.com/devtools-html/perf.html/issues/844#issuecomment-384451033 we could prefilter the nodes we want to display to cut down the algorithm time.