Flatten function performance issue v4 #2424
Having recently tried to upgrade our styled-components from v3 to v4 in a relatively large react app - we've ran into a strange performance issue that seems to be tied to the flatten function. When commenting out this part of flatten, the issue seems to resolve:
Lines 59 to 72 in 9b81695
Here are screenshots of performance snapshots run with chrome dev tools when performing the same action in our app on v3 vs. v4:
Strangely, we have not been able to reproduce this in a clean slate react app.
Unable to reproduce with a basic react app created via
Performance is as good if not better than v3.
Performance is sluggish, significantly slower than v3.
The text was updated successfully, but these errors were encountered: