question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getFlameGraphTiming is slow

See original GitHub issue

STR:

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:open
  • Created 6 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
julienwcommented, Mar 12, 2018

Ah yes, thanks @brisad! Definitely you should use a simpler method instead of getDisplayData. In the profile’s inverted tree, extractFaviconFromLibname stands out right after getChildren so I think it’s a worthwhile optimization.

0reactions
julienwcommented, Aug 21, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found