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

Expose sampled call stacks #42

Open
kshyju opened this issue Jun 27, 2018 · 9 comments
Open

Expose sampled call stacks #42

kshyju opened this issue Jun 27, 2018 · 9 comments

Comments

@kshyju
Copy link

kshyju commented Jun 27, 2018

Can the api tell us a little more specific information about what snippet of code which is causing the long task ? May be the A call stack ?

Currently the containerSrc attribute is helpful if an iframe is causing the issue.(The culprit could be one of the many js files loaded to that iframe).

@npm1
Copy link
Contributor

npm1 commented Jul 13, 2018

Yea, we know current attribution needs to be improved, although not sure when we'll get to work on this. How would the callstack to work when there are multiple top-level functions in a single longtask? Just provide one relevant callstack could work?

@kshyju
Copy link
Author

kshyju commented Aug 18, 2018

Relevant piece of the closest call stack might be a good start.

@SilentImp
Copy link

Maybe it should be an array of call stacks?
But we definitely need something — at the moment I don't understand how to use it.

@npm1
Copy link
Contributor

npm1 commented Apr 5, 2019

We're currently punting this, waiting to see if the Sampling Profiler API ships. If it does, we could benefit from it to expose some useful information about tasks that take long to execute. Hopefully soon :)

@SilentImp
Copy link

@npm1 what is Sampling Profiler API? I try to google it, but no luck, so any refs would be highly appreciated. Is it new awesome browser api?

@npm1
Copy link
Contributor

npm1 commented Apr 5, 2019

It is a proposed API, although I'm not the one working on it: https://github.com/WICG/js-self-profiling

@tdresser tdresser changed the title Can we get call stack ? Expose sampled call stacks Jun 12, 2019
@toddreifsteck toddreifsteck added this to the Level 2 milestone Aug 1, 2019
@felipe-dialpad
Copy link

Hello there! Is this being reconsidered now with the work on the LoAF API?

I think this would be a great addition to have. It would provide a very simple and lightweight way to watch the JS Main Thread without having to make use of the Self Profiling API.

@blueken
Copy link

blueken commented Oct 10, 2023

I am working on LoAF now, and trying to to find which function caused a long task.

With LoAF API, I can find sourceLocation in entry.srcipts[i], but it only give a character position of a file (even this position is not that precise).

How can I get call stack information like what is in the "Call Tree" tab under "Performance" in devtools?

@yoavweiss
Copy link
Contributor

^^ @noamr

How can I get call stack information like what is in the "Call Tree" tab under "Performance" in devtools?

I believe that would be too expensive to extract for an API that's on-by-default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants