styled-components / babel-plugin-styled-components

Improve the debugging experience and add server-side rendering support to styled-components
MIT License
1.07k stars 139 forks source link

bumping the babel-plugin-styled-components to 2.0.5 make a regression in performance inside our tests #373

Closed daniloab closed 2 years ago

daniloab commented 2 years ago

Bumping the babel-plugin-styled-components to the last version 2.0.5 makes the performance from our tests decrease a lot making a unique test take at least 8 minutes to run and breaking it.

By now, our fix was reverted to the previous version 2.0.4 and our tests start to run normally again.

before bump Screen Shot 2022-02-24 at 14 33 59

after bump Screen Shot 2022-02-24 at 14 33 37

reverting bump Screen Shot 2022-02-24 at 14 37 54

janicduplessis commented 2 years ago

I'm also seeing a major perf regression of my website build after bumping to 2.0.5, 2.0.4 is fine. At runtime I also get a _styled is not defined error. From inspecting the code it seems like the styled component import is not added automatically.

ghost commented 2 years ago

I have the same problem here, but with the NextJS build. It used to be 3 minutes (with 2.0.3) and now it takes over 20 minutes (2.0.5).

jordan-brough commented 2 years ago

We're seeing build times increase so much that automated builds are timing out if we try to update from 2.0.3 to 2.0.5.

quantizor commented 2 years ago

Thank you, I'm going to revert the last change. Is 2.0.4 as bad or just 2.0.5?

quantizor commented 2 years ago

I have reverted the change from 2.0.5: https://github.com/styled-components/babel-plugin-styled-components/releases/tag/v2.0.6

jordan-brough commented 2 years ago

Thanks. v2.0.6 seems to have fixed the issues we were seeing. 👍