Improve Spinner performance #1547
Labels
enhancement
New feature or request
released
This issue/pull request has been released.
@theme-ui/components
Is your feature request related to a problem? Please describe.
Right now, due to how the Spinner component is implemented, it increases the CPU usage, due to causing re-layouts on the page
(notice the layouts/sec and style recalc/sec measurements at the bottom, along with CPU usage at the top)
This is because animating an element of an SVG triggers this event (at least on Chrome 88 on desktop) and is not (fully?) GPU accelerated.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Spinning a DOM element--for example, an entire SVG element, instead of just a part of it--fixes this issue.
This could be done without making any changes to the visuals of the spinner element as it is.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: