Benchmarking the performance of CSS @property

With @​property now being Baseline Newly Available, I thought it’d be a good time benchmark the impact – if any – it has on the performance of your CSS. When starting to use a new CSS feature it’s important to understand its impact on the performance of your websites, whether positive or negative. With @property …


This content originally appeared on Bram.us and was authored by Bramus!

With @​property now being Baseline Newly Available, I thought it’d be a good time benchmark the impact – if any – it has on the performance of your CSS.

When starting to use a new CSS feature it’s important to understand its impact on the performance of your websites, whether positive or negative. With @property now in Baseline this post explores its performance impact, and things you can do to help prevent negative impact.

For this I built and open sourced the “CSS Selector Benchmark” project which I have been working on for some time now.

To benchmark the performance of CSS we built the “CSS Selector Benchmark” test suite. It is powered by Chromium’s PerfTestRunner and benchmarks the performance impact of CSS. This PerfTestRunner is what Blink (= Chromium’s underlying rendering engine) uses for its internal performance tests.

The runner includes a measureRunsPerSecond method which is used for the tests. The higher the number of runs per second, the better.

The created benchmarks for @property specifically measure how fast Blink can handle a Style Invalidation and the subsequent Recalculate Style task. This was tested with both registered and unregistered custom properties, as well as regular properties.

Read “Benchmarking the performance of CSS @property” on web.dev →
Check out “css-selector-benchmark” on GitHub →


This content originally appeared on Bram.us and was authored by Bramus!


Print Share Comment Cite Upload Translate Updates
APA

Bramus! | Sciencx (2024-10-03T13:03:14+00:00) Benchmarking the performance of CSS @property. Retrieved from https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/

MLA
" » Benchmarking the performance of CSS @property." Bramus! | Sciencx - Thursday October 3, 2024, https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/
HARVARD
Bramus! | Sciencx Thursday October 3, 2024 » Benchmarking the performance of CSS @property., viewed ,<https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/>
VANCOUVER
Bramus! | Sciencx - » Benchmarking the performance of CSS @property. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/
CHICAGO
" » Benchmarking the performance of CSS @property." Bramus! | Sciencx - Accessed . https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/
IEEE
" » Benchmarking the performance of CSS @property." Bramus! | Sciencx [Online]. Available: https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/. [Accessed: ]
rf:citation
» Benchmarking the performance of CSS @property | Bramus! | Sciencx | https://www.scien.cx/2024/10/03/benchmarking-the-performance-of-css-property/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.