firefox-devtools / firefox-devtools/profiler

Call tree width needs to take into account the size of items

Open
#2,522 4 comments 0 reactions 0 assignees View on GitHub
call tree polish
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 5h
Merged PRs (30d)
30

Description

See this screenshot, shared by staktrace in [bug 1633455](https://bugzilla.mozilla.org/show_bug.cgi?id=1633455):
![](https://user-images.githubusercontent.com/454175/80465770-e36f0100-893b-11ea-9a9f-c89676136542.png)

Currently our call tree width is computed using an heuristic that takes into account only the call tree's depth but not the call tree's items:
https://github.com/firefox-devtools/profiler/blob/8a76c7490bd03ef737c0affdaeb8dabe63149ec7/src/components/shared/TreeView.js#L727
I believe it stays fixed for performance reasons (?).

Not sure what the right path is here. I wonder what the missing part is: is it only arguments? or can it be the function name if the return type has a lot of templating? Should we remove some of this templating instead, like keeping only the outer object (but in the case of Rust types, we would keep sometimes Box/Arc which isn't meaningful)? Or shorten each part? Lots of questions :-)

stacktrace do you think you can share with us a link to this profile? Thanks!

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-255)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.