Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Nov 4, 2017

Builds on #11453.

The plan is to keep it __DEV__ only for open source, but enable it based on a feature flag internally so we can experiment with using it in production for some users.

I have verified this doesn't inflate the open source build sizes.

I also exposed a ref counting interface to toggle the flag from www product code.

@gaearon gaearon changed the title [WIP] Put perf integration behind a feature flag Put perf integration behind a feature flag Nov 5, 2017
Copy link
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

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

LGTM minus nits

export const enablePersistentReconciler = true;

export function addUserTimingListener() {
invariant(false, 'Not implemented.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a clearer message?

export const enablePersistentReconciler = false;

export function addUserTimingListener() {
invariant(false, 'Not implemented.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@gaearon gaearon merged commit 3b27160 into facebook:master Nov 6, 2017
@gaearon gaearon deleted the perf branch November 6, 2017 16:14
@iamdustan
Copy link
Contributor

fwiw I would really like a flag to expiriment with disabling this in devmode in open source. Our performance in development on React 16 has plummeted (it’s comparable in most scenarios in production with a few major regressions). The experiment is to see how much we’re paying for the usertiming integration in dev.

@gaearon
Copy link
Collaborator Author

gaearon commented Nov 10, 2017

You can disable it manually in the npm bundle and then see if it helps :-) if it does, I'm open to exposing this somehow.

Ethan-Arrowood pushed a commit to Ethan-Arrowood/react that referenced this pull request Dec 8, 2017
* Enable User Timing API integration with a feature flag

* Expose a way to toggle user timing flag in www

* Update ReactNativeCSFeatureFlags.js

* Update ReactFeatureFlags.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants