js-self-profiling icon indicating copy to clipboard operation
js-self-profiling copied to clipboard

Adding Parsing & Compilation to Profiler Markers

Open magenish opened this issue 4 years ago • 2 comments

The new markers feature going to be super helpful.

I believe adding parsing and compilation markers (both in time and defer) to it could be super helpful to understand the real cause of long JS and main thread bottlenecks.

Its s available in chromium devtools so i guess that something achievable.

magenish avatar Feb 06 '22 08:02 magenish

Thanks for the feedback @magenish following up with @ArthurSonzogni in the TAG review ticket #61 .

cnpsc avatar Feb 07 '22 17:02 cnpsc

Nothing that I can think of. Could you confirm those are dedicated to a single document and you won't be able to observe other documents this way? That would be my expectations, but I might be wrong.

Given that markers are already behind crossOriginIsolation, the documents of the page already "agreed" seeing their data to be potentially exposed to other documents of the page, via the Spectre vulnerability. So I guess, even if there was a risk of leaks, we could still argue this is not worse than the status-co in this case.

Still I would be more confident if one could say that this could not be used to observe others. I think it can't.

@MikeWest, @shhnjk, @arturjanc FYI.


So we would get the following markers:

[               
  "script",     
  "gc",         
  "style",      
  "layout",     
  "paint",      
  "parsing",    
  "compilation",
  "other"       
]

What "parsing" refers to? I guess HTML + CSS + javascript. More? What "compilation" refers to? I guess optimizing the javascript and wasm?

I think it would be nice explicitly what the name is about and discussing with folks about it, so that you won't regret the current API in the future.

@yoavweiss FYI.

ArthurSonzogni avatar Feb 07 '22 17:02 ArthurSonzogni