longtasks icon indicating copy to clipboard operation
longtasks copied to clipboard

Can we find which script or function is taking longer than 50 ms?

Open Vasikaran opened this issue 8 years ago • 8 comments

In long task API has a name attribute, which value is self. It's not more specific detail to find long task. If we find which script or function is taking longer than 50 ms, the optimize is too easy.

Vasikaran avatar Jun 19 '17 17:06 Vasikaran

Yes, long tasks V2 will have scriptUrl. Details in this doc: https://docs.google.com/document/d/125d69JAC7nyx-Ob0a9Z31d1uHUGu4myYQ3os9EnGfdU/edit

spanicker avatar Jun 23 '17 05:06 spanicker

When will you release Long Task V2?

Vasikaran avatar Jun 23 '17 10:06 Vasikaran

We are just starting to work on this, so hopefully in a couple of milestones.

spanicker avatar Jun 29 '17 00:06 spanicker

If you release the feature within two or three weeks, it will be very helpful to me.

Vasikaran avatar Jun 29 '17 06:06 Vasikaran

Actually , i have the same question as @Vasikaran : can we find which scripts are culprit for long Tasks (through the name field) and when the V2 of the API will be released. Thanks

RaoufHammami avatar Feb 17 '20 17:02 RaoufHammami

We currently do not plan to expose the script URL, AFAIK. We don't have any concrete future work on how to make attribution better in general. This was deprioritized because of an effort on the sampling profiler, see https://github.com/WICG/js-self-profiling. Ideally after that is shipped then we can use it to surface some longtask attribution.

npm1 avatar Feb 18 '20 18:02 npm1

We did some experiments at Elastic, here are the relevant details - https://github.com/WICG/js-self-profiling/issues/21

vigneshshanmugam avatar Feb 19 '20 11:02 vigneshshanmugam

FWIW, I'm cautiously hopeful to make progress on that using Task Tracking as infrastructure on top of which attribution can be built.

yoavweiss avatar Jan 06 '22 17:01 yoavweiss

Marking as duplicate of https://github.com/w3c/longtasks/issues/89

noamr avatar Feb 05 '23 08:02 noamr