Closed codelzb closed 1 year ago
I agree it is kind of confused.
Let me explain a bit about how to measure the time for Webpack compile time and loader time:
For webpack compile time, we use internal hook "compile" and "done", record the time and calculate the difference, pretty easy.
For loaders, this is kind of different. Each time the loader is executed for some resource, we record the start time and end time. But this might be parallel, and we will accumulate the total time. Also, if the loader is async, we record the end time when the loader function is finally resolved.
So,
If you think this resolve your issue: To reduce the similar confusion from others, do you have any friendly suggestions on the output of the plugin? (Feel free to just close this issue)
If you think this is still a bug that need to be fixed: According to the unusual assumed name of your loaders, I believe you are using some framework, could you please provide a minimal repo or some steps to reproduce this issue?
After I understand these reasons, I don't think it will affect my optimization of webpack config,But I hope the official version will do better in the future, such as the parallel and asynchronous cases you mentioned
Describe the bug I am not sure if this is a display error,webpack gives the total time of 7102ms,time-analytics-webpack-plugin is 7093.857900001109ms, What puzzles me is that All loaders take 25601.421200003475ms
Screenshots