question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigate ServerStyleSheet construction performance

See original GitHub issue

It seems like new ServerStyleSheet() is our biggest SSR perf bottleneck according to the SSR benchmarks added in #2119, which in turn makes it seem like StyleSheet.clone() is the actual bottleneck.

Since as of v4 everything is in the component-context, I’m not 100% certain why we need to clone anything anymore on the server. It seems as though creating a cache of styles per each request should be a cheap operation since nothing should be shared anymore between requests?

Going to defer to @kitten’s expertise since he wrote most of that—can we maybe speed up or get rid of the cloning entirely?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mxstbrcommented, Oct 19, 2018

@kitten that makes a lot of sense, thanks for the detailed write-up! Excited to see where this goes.

0reactions
probablyupcommented, Jun 16, 2019

Closed thanks to v5!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases - styled-components
Prevent ServerStyleSheet from emitting empty style tags, which would cause issues in ... Big performance gain for components using style objects (see #3239)....
Read more >
material-ui/core/CHANGELOG.md - UNPKG
This release widens the peer dependency scope of React to accept ^17.0.0. 32, The change makes it easier for developers to upgrade React...
Read more >
styled components not working in prod nextjs - You.com
The performance of our custom dynamic styles implementation (based on props) isn't great (see the performance benchmarks below). This is seriously limiting ...
Read more >
Planning Analytics for Microsoft Excel - IBM
Use Planning Analytics for Microsoft Excel without Performance Manager ... A log file is an important diagnostic tool for investigating the ...
Read more >
An analysis of operating system behavior on a simultaneous ...
Redstone et al. investigated the performance of workloads running on a simulated SMT system with a full operating system [Redstone00] .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found