Discussing a potential performance.isProfiling() method
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 430
- Forks
- 81
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 2
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the referenced Web Performance APIs, including performance.measure and console.timeStamp, and review the existing discussion in this issue. Determine whether a standard profiling-detection method is feasible and what its API behavior should be; no implementation files or tests are identified in the payload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100