Skip to content

Conversation

@AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jun 9, 2020

Experimenting with https://reactjs.org/docs/profiler.html

window.__REACT_DEVTOOLS_GLOBAL_HOOK__

@getsentry-bot
Copy link
Contributor

Warnings
⚠️ Please add a changelog entry for your changes.
Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 17.0732 kB) (ES6: 16.1367 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against 219d1b2

const fake = React.createElement('div') as any;

// tslint:disable-next-line: triple-equals no-unsafe-any
if (fake._owner != null && fake._owner.actualDuration != null) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sucks, but I can't find a better way to figure out if a user can profile or not.

@AbhiPrasad AbhiPrasad changed the title [WIP] Experiments [WIP] React Profiler Experiments Jun 9, 2020
@AbhiPrasad
Copy link
Member Author

Closing this PR with the following thoughts:

  • Supporting interaction tracing means we will have to decide on a specific scheduler and React version to support. This leads to a bunch of if statements to decide on how the Profiler has to be used. See this doc by bvaughn: https://gist.github.com/bvaughn/8de925562903afd2e7a12554adcdda16

  • Detecting a profiling bundle is very difficult. Maybe that will change in the future?

  • The Profiling API is unstable. This means that things could change at any moment. We should wait for them to announce something official before continuing work on this.

@AbhiPrasad AbhiPrasad closed this Jun 16, 2020
@AbhiPrasad AbhiPrasad deleted the abhi/profiler-experiments branch June 16, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants