Intent to Prototype: js-profiling-mode=eager|lazy Document-Policy for JS Self-Profiling API

12 views
Skip to first unread message

Thomas BERTET

unread,
12:54 PM (4 hours ago) 12:54 PM
to blin...@chromium.org
Contact emails
thomas...@gmail.com

Explainer
https://github.com/WICG/js-self-profiling/issues/86

Specification
https://wicg.github.io/js-self-profiling/#js-profiling-mode

Summary
Introduces a new Document-Policy value "js-profiling-mode=eager|lazy". 
Setting "js-profiling-mode=lazy" authorizes JS Self-Profiling capability without incurring immediate initialization overhead during page load. 

Note: This change doesn't affect the actual feature beyond the default setting.

Blink component
Blink>PerformanceAPIs

Web Feature ID
profiler

Motivation
JS Self-Profiling is a pre-existing feature, but currently only supports eager mode.

There are several pain points with the current “eager” approach: 
1 - Performance trade-offs between loading and profiling 
There is no way to defer profiling overhead to a non-critical period (e.g., after page load). 
There is no way to incur overhead only if the Profiling API is actually used. Many users are unwilling to trade page load performance for profiling capabilities. 
2 - Sampling strategy coupling between backend (server) and frontend (client) 
To avoid overhead on unsampled sessions, sampling must be aligned between server and client, which introduces operational complexity. 
In many setups, sampling occurs on the client side; keeping server and client in sync requires additional tooling. Even if a session is not sampled, the presence of the header means the page still pays the warm-up cost.

(See https://github.com/WICG/js-self-profiling/issues/86 for full context)

Initial public proposal
https://github.com/WICG/js-self-profiling/pull/87

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/473861788?pli=1

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5108831124324352?gate=5074849745731584

This intent message was generated by Chrome Platform Status.
-- 

Best,

Thomas BERTET
Reply all
Reply to author
Forward
0 new messages