Open spawnia opened 2 years ago
@spawnia Have you looked at the differences between 1.12.0 and 1.12.1 to see what might be causing this?
Actually it seems clear that the culprit would be the caching changes in https://github.com/styled-components/babel-plugin-styled-components/pull/327
Not sure yet why those caused a slowdown, though.
Thanks for looking into this @agriffis. I did compare the two tags via https://github.com/styled-components/babel-plugin-styled-components/compare/v1.12.0...v1.12.1, but was intimated by the large number of changed lines. Turns out the actual code changes were quite small, you identified them correctly.
I also cannot tell why those changes would be an issue, I can just give you more information about our environment: we are consuming a component library which itself uses this plugin and is bundled with rollup, but the slowdown happens when updating the dependency in our main application. This main application does not use rollup.
Not fixed in 2.0.7
. Dev build takes about 27s, while on 1.12.0
build runs in 7s.
Upgrading this library to 1.12.1 or above causes a massive slowdown of our test runs. Here is how long our tests run with different versions of this library:
Some details about our project:
node
14.18.3webpack
5.70.0@babel/core
7.17.5styled-components
5.2.1react
16.13.1jest
26.6.3Thanks for this library, please let me know if you need further details from me.