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

Turn off Advanced Module Optimization in development #4716

Closed
peterdotjs opened this issue Apr 15, 2017 · 7 comments
Closed

Turn off Advanced Module Optimization in development #4716

peterdotjs opened this issue Apr 15, 2017 · 7 comments

Comments

@peterdotjs
Copy link

peterdotjs commented Apr 15, 2017

Do you want to request a feature or report a bug?
Feature Request

What is the current behavior?
In development when using require.ensure the incremental builds take ~8.5s. The majority of the time is during advanced module optimization. When removing require.ensure the incremental builds go down to ~1.5s.

If this is a feature request, what is motivation or use case for changing the behavior?
This would greatly speed up development time if we could turn off the optimization in development. A current workaround is to possibly use a generated version of our files with require.ensure removed. (https://github.com/knpwrs/babel-plugin-remove-webpack helped with this process) Idealy this is a switch that could be turned off/on from the webpack config. I doubt I am alone in needing this feature as many others are wanting to decrease incremental build times. If you this is something you think is reasonable and doable I'd gladly submit a PR if you point me in the right direction. Thanks!

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

Node Version: v6.9.4
Wepback Version: 2.2.0
OSX 10.12.2

@peterdotjs
Copy link
Author

peterdotjs commented Apr 21, 2017

@sokra @bebraw is there any guidance you can provide? Or should I hold tight and use my current workaround for now? Thanks!

@bebraw
Copy link
Contributor

bebraw commented Apr 21, 2017

@peterdotjs Not that I know of. Incidentally I got the same question from someone that is using SSR. Splits don't make sense on server-side so they should be flattened. I think Tobias will be able to answer this more fully.

@sokra
Copy link
Member

sokra commented Apr 21, 2017

You can try one of these PRs, if they fix the performance issue:

#4738
#4764

@peterdotjs
Copy link
Author

Thanks a lot for the quick response and in general all the work you both have put in to maintaining this project. I'll try those out.

@dengwanc
Copy link

dengwanc commented Feb 7, 2018

my webpack version 2.4.1
got this

185ms building modules
133ms sealing
0ms optimizing
0ms basic module optimization
8ms module optimization
8291ms advanced module optimization
0ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1ms module and chunk tree optimization
29ms module reviving
3ms module order optimization
25ms module id optimization
35ms chunk reviving
15ms chunk order optimization
30ms chunk id optimization
203ms hashing
3ms module assets processing
32ms chunk assets processing
6ms additional chunk assets processing
0ms recording
0ms additional asset processing
0ms chunk asset optimization
0ms asset optimization
38ms emitting
Hash: 9ba30154a8b8804cfd3a
Version: webpack 2.4.1
Time: 9060ms
                                  Asset     Size  Chunks                    Chunk Names
mm__node.import.a1c11a887656e2d1e788.js   657 kB  1, 175  [emitted]  [big]
                 mm__node.bundle.min.js  2.28 MB     295  [emitted]  [big]  main
 [137] ./front_end/routes/contact/detail.js 3.61 kB {1} [built]
       [] -> factory:0ms building:0ms dependencies:10ms = 10ms
 [493] ./~/moment-mini/locale ^\.\/.*$ 189 bytes {295} [optional] [built]
       [] -> factory:0ms building:0ms dependencies:0ms = 0ms
    + 1481 hidden modules

should i upgrade my webpack version to solve this problem ?

@alexander-akait
Copy link
Member

problem still exists? with webpack@3 or webpack@4?

@alexander-akait
Copy link
Member

Closing due to inactivity also webpack@2 is deprecated. Please test with latest version (webpack@3 or webpack@4) and feel free to create new issue if still have problems/regressions. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants