firefox-devtools / firefox-devtools/profiler

It's not easy to get the names of functions that has namespaces / class names that are taking a lot of character space (e.g. due to generic parameters)

Open
#4,944 2 comments 0 reactions 0 assignees View on GitHub
call tree flame graph polish stack chart
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

example: https://profiler.firefox.com/public/2472k1k8y08jzryrcj1f60jsntaae0br7dax5ag/flame-graph/?globalTrackOrder=0w3&thread=3&v=10

function name: `style::invalidation::element::invalidator::TreeStyleInvalidator::invalidate_child`
function name with all types: `style::invalidation::element::invalidator::TreeStyleInvalidator >::invalidate_child >(style::gecko::wrapper::GeckoElement, ref$ >, smallvec::SmallVec >*, style::invalidation::element::invalidator::DescendantInvalidationKind) [servo/components/style/invalidation/element/invalidator.rs]`

The only way I found to get the name for this function was to copy the function name from the context menu, and paste it elsewhere.

The problem is everywhere: call tree, flame graph, stack chart, tooltip.. but not the sidebar. Maybe a quick win would be to display just the function name in the tooltip. Possibly the opposite is better: display just the function name in the flame graph and stack chart, but the full name (non ellipsis-ed) in the tooltip.

Other ideas:
We should probably reduce the length of some generics. Ideas: remove the module name, replace the generics by `...` after some depth. What are other tools doing?

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

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.