Does CSS class name length affect browser performance?

Example: Gmail.

Of all the DOM elements, ~ 2000 has at least one CSS class, and there are ~ 500 different CSS class names on the page. Gmail uses closing-stylesheets to minimize / remove their CSS class names. Does this step increase browser performance? I am thinking about parsing / evaluating HTML / CSS code, choosing a selector, etc.

Example of a cropped class name: "aBc"
Example of the original class name: "tooblar__button - disabled"

+4
source share
2 answers

Yes. Less bytes less bytes. However, the chances of it being an important factor are tiny.

+5

, . , , , . JSPerf, . . , , .

+3

Source: https://habr.com/ru/post/1539455/


All Articles