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

missing: how long does speed measure webpack plugin take? #36

Closed
hrgui opened this issue Apr 2, 2018 · 4 comments
Closed

missing: how long does speed measure webpack plugin take? #36

hrgui opened this issue Apr 2, 2018 · 4 comments

Comments

@hrgui
Copy link

hrgui commented Apr 2, 2018

Sample output:

 SMP  ⏱
General output time took 16.54 secs

 SMP  ⏱  Plugins
HtmlWebpackPlugin took 2.1 secs
WatchMissingNodeModulesPlugin took 1.45 secs
HotModuleReplacementPlugin took 0.615 secs
IgnorePlugin took 0.056 secs
CaseSensitivePathsPlugin took 0.018 secs
InterpolateHtmlPlugin took 0.016 secs
NamedModulesPlugin took 0.012 secs
DefinePlugin took 0.005 secs

 SMP  ⏱  Loaders
ngtemplate-loader, and
html-loader took 0.955 secs
  module count = 1

Notice how the general output time takes 16.54 s, but if we look at the plugins, we are missing 14 seconds. Note that the difference is easily noticeable when reproducing #35.

@stephencookdev
Copy link
Owner

Hey @hrgui, thanks for raising this. Assuming I'm understanding you correctly, I think there might be a misunderstanding about what SMP is showing.

The "General output time" is how long it takes webpack to do everything in the build. The plugin times aren't expected to add up to that number.

E.g., what that output is showing you is that with no plugins at all, your build would still take around 13 seconds.

Does that make sense, or am I misunderstanding what you're saying?

@hrgui
Copy link
Author

hrgui commented Apr 5, 2018

@stephencookdev

The "General output time" is how long it takes webpack to do everything in the build. The plugin times aren't expected to add up to that number.

Would that be a combination of Loaders and Plugins? Now that I've read other timings, even before #35 kicks in, I find that I am missing a little amount of time (but I am making assumptions about how I add up the numbers), but not significant enough to call it out.

Also, I guess it's a bit hard to figure out how the numbers for plugins or loaders contribute to the General output time, because we don't know if the plugins or the loaders were executed in parallel or in series.

I think if #35 is fixed, I think SMP only probably contributes a small, negligible amount to the time taken.

@stephencookdev
Copy link
Owner

It's a combination of all loaders, plugins, and any other set-up time that webpack has in getting everything in order. I'll see if I can find a way to make it clearer that it's not meant to be a summation of the loaders and plugins (although it's expected to be in that ballpark, since webpack doesn't do much else usually)

And yes, as you say, parallelisation can cause some time discrepancies. Again, in theory it would be nice to output this information, but measuring parallelisation is quite hard!

@dutzi
Copy link

dutzi commented Sep 10, 2019

@hrgui Try playing with the devtool property, set it eval to see if you see any significant change, if so read Webpack's docs and try the other, less cheap, options

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

No branches or pull requests

3 participants