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
Webpack 5 triggers a slow V8 concat
path resulting in significant performance degradation in some scenarios
#14580
Comments
Oh interesting... I wanted to add an option to opt out of deprecations anyway. Something like |
…ible APIs See https://github.com/webpack/webpack/releases/tag/v5.62.0 and webpack/webpack#14580 for more context.
For anyone who might be interested we did a writeup of how we tracked down this issue. |
@eoin deprecated versions of |
So helpful. Our website had a lot of [].concat([...]) on loading from initiating some old validations. replacing old core-js speed up the runtime by a LOT. |
Early in Webpack 5 development the
arrayToSetDeprecation
helper was added to support migrating some objects fromArray
toSet
. In order to maintainArray
-like behaviour inconcat
the helper setsSymbol.isConcatSpreadable
. On V8, settingSymbol.isConcatSpreadable
anywhere puts all subsequent invocations ofconcat
within anIsolate
on a slow path.There are cases where this can result in significant performance degradation. In this repro case, builds go from 1s with Webpack 4 to 16s with Webpack 5. We came across this when debugging this Linaria issue, where our production build slowed from ~10s to 2m+. I wonder if this could be the cause of some issues in #12102.
The text was updated successfully, but these errors were encountered: