Skip to content

feat(performancebudgets): set warnings in console off by default - #3604

Merged
TheLarkInn merged 1 commit into
masterfrom
feature/set_perf_hints_false_by_default
Dec 28, 2016
Merged

TheLarkInn merged 1 commit into
masterfrom
feature/set_perf_hints_false_by_default

Conversation

@TheLarkInn

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?
Feature/Bugfix

Did you add tests for your changes?
Updated existing tests to meet changes needs.

If relevant, link to documentation update:
Will need to create issue.

Summary
Performance Hint warnings and errors will be now opt-in. However, the [big] entity will now show by default. Currently there is no way in webpack to discern one env from another for developers, therefore its too difficult to control or determine what env a user might be in and when to intelligently display perf hints.

As much as an organization we want to do our part and encourage users to be aware of the sizes of their web application bundles that they are emitting, the feedback that we have gotten is that for this to be a opt-out, it needs to have more intelligent env understandings, as well as calculating gzip and minified sizes during dev env vs prod.

It's better to instead have this opt-in for now, and for webpack v2.4-3+ to add more intelligent features that allow this to be turned back to an opt-out feature (which is end goal).

Addresses concerns from #3485 and comments later in #3216.
Does this PR introduce a breaking change?
No

Other information
Will need to update Documentation to state that perf.hints is now false by default.

@SpaceK33z SpaceK33z left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like a good idea.

@bebraw bebraw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@TheLarkInn
TheLarkInn merged commit 5f14559 into master Dec 28, 2016
@SpaceK33z
SpaceK33z deleted the feature/set_perf_hints_false_by_default branch December 28, 2016 17:39
@addyosmani

Copy link
Copy Markdown

the feedback that we have gotten is that for this to be a opt-out, it needs to have more intelligent env understandings, as well as calculating gzip and minified sizes during dev env vs prod.

Reviewing the feedback, I understand and support this decision. Let's start thinking about how we might go about detecting environments better so there's a real chance this can be switched back on as a default for folks - @TheLarkInn is there an issue already open for discussing ideas?

@TheLarkInn

Copy link
Copy Markdown
Member Author

Not yet, let's get one on the docket and I'll.drop it into our feature milestone

nkzawa pushed a commit to nkzawa/webpack that referenced this pull request Dec 29, 2016
@ericclemmons

Copy link
Copy Markdown

Glad to see this was turned off.

With an empty bundle & webpack-dev-server -d, --inline being enabled by default caused false positives that my team didn't know how to resolve. (Similarly, using html-webpack-plugin shows lodash being included in the bundle at ~350k, but I suspect it's another false positive).

So, I think we'd need to account for a few things:

  • How can we restrict the calculation to dependencies from the primary entry-point (not webpack/hot/client, react-hot-loader/patch, etc.)?
  • Is costly gzip'ing a requirement, or is there a median cost saving (e.g. 60%) that we can apply to save spinning cycles as part of a performance check?
  • We run some crazy clojure compiler stuff against our code (I didn't set it up, I swear!), so a sane default could be enabling performance based on NODE_ENV=production.

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.

5 participants