-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
manually call sheet.seal() during SSR to avoid memory leaks #329
Comments
We can probably do this in core and just rethrow the error instead of having people do this themself. What do you think @mxstbr? |
Oh yeah not a bad idea! |
@probablyup @mxstbr I actually think we don't need to clone on develop with SSR anymore as all global styling is now gone if I'm not mistaken 🤔 That'd get rid of the issue more elegantly 😍 |
oh??? |
@kitten I think you're right, omg. Wanna dig into that? |
🤔 Hmm, what version is this? S-C 4.1.1 doesn't have BTW, @brunorzn do you also use Colemak? Sheep instead of sheet :) |
Ah yeah it's called |
I updated the example and subject. @kitten not cloning at all would be better of course - afaik there is no way to add global styles any more |
…nents example (#6107) I was noticing some bad memory leak on my company's application and I ended up finding this github issue ( styled-components/styled-components#1624 ) . This comment ( styled-components/styled-components#1624 (comment) ) caught my attention, which lead to this other issue on the repository of styled components website ( styled-components/styled-components-website#329 ) After applying the changes on my project I noticed a huge improvement on memory consumption. So would be nice to update the example or start a discussion on how to solve this properly
This is linked to styled-components/styled-components#1624 (comment)
To avoid memory leaks, we need to manually call sheep.seal during SSR, if any error has been thrown during rendering.
Here is an example :
The text was updated successfully, but these errors were encountered: