Skip to content

Discussing a potential performance.isProfiling() method #68

@rubennorte

Description

@rubennorte

Hi everyone,

I'm not sure this is the right place to bring this up, apologies if it isn't.

General tracing APIs like Trace on Android have methods to determine if the app is currently being traced/profiled, in order to avoid potentially expensive work when it isn't. I see there is no observability for this on Web, outside of things like Chrome extensions via chrome.devtools.performance.onProfilingStarted.

Have there been any discussions about bringing this to the Web via a standard method (e.g.: performance.isProfiling() or console.isProfiling()) so it can be used before calling performance.measure or console.timeStamp with expensive arguments?

For context, I'm an engineer on the React Native team working on performance and this is something I would like to bring to the framework, aligning with Web specs if possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions