Flatten the curve in UI components #483
Replies: 3 comments
-
What do you mean by flatten? |
Beta Was this translation helpful? Give feedback.
-
I almost forgotten about this, flatten means if there is a way to reduce rendering which I think is similar to React's useEffect that rendering only once to avoid expensive Page re-rendering each time it's access by hybrid rendering, this reduce latency response. In Page, we have a complex dashboard.astro with lots of chart and graph, some components doe not need to re-render.
|
Beta Was this translation helpful? Give feedback.
-
There's no concerpt in rerendering in Astro components so I'm not sure I follow. Could you clarify? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Flatten UI component when prerender is true can helps minimize latency on every requests.
Background & Motivation
Dynamic rendering in hybrid rendering could suffer with large number of UI components.
Goals
We could flatten the layers to keep expensive rendering less costly and minimize CPU latency.
Example
The goals I assume by default, Astro could flatten UI components on every requests except
<Tag client:dynamic />
will be re-render.Beta Was this translation helpful? Give feedback.
All reactions