Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dev): allow performance marking in production (fix #11775) #11776

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

vegerot
Copy link

@vegerot vegerot commented Nov 17, 2020

close #11775

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe: Developer-related improvement

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
To quote #11775 :

What problem does this feature solve?

Similar to devtools, Vue.config.devtools is enabled by default for development and disabled by default for production. However, the developer can choose to override that behavior (for example, for debugging) by manually setting Vue.config.devtools = true. However, this same lenience is not afforded to Vue.config.performance. Even if explicitly enabling it, the developer's setting will be overridden by Vue in production.

What does the proposed API look like?

This commit brings Vue.config.performance in line with Vue.config.devtools, by disabling it by default in production, but gives the developer the ability to explicitly ��enable it; for example, for debugging performance issues.

Questions for reviewer:

  • I changed a couple of files, but truth is I'm not sure what the change in packages/ and src/platforms does. Advisement there would be appreciated

close vuejs#11775

Similar to devtools, `Vue.config.devtools` is enabled by default for development and disabled by default for production.  However, the developer can choose to override that behavior (for example, for debugging) by manually setting `Vue.config.devtools = true`.  However, this same lenience is not afforded to `Vue.config.performance`.  Even if explicitly enabling it, the developer's setting will be overridden by Vue in production.

This commit brings `Vue.config.performance` in line with `Vue.config.devtools`, by disabling it by default in production, but gives the developer the ability to explicitly enable it; for example, for debugging performance issues.
@vegerot vegerot force-pushed the production_performance branch from 522e50f to f99f21c Compare November 17, 2020 15:31
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.

Enable performance measuring in production, at the user's request
1 participant