Sass Mixins vs. Extends: The Data
tech.bellycard.com
tech.bellycard.com
For larger sites with tons of visitors, page load speed has a tangible impact on revenues. Being able to trim off another 100ms can result in millions of extra sales every month.
Perhaps we should focus on a CSS optimizer that rewrites CSS rules in the mixin style? Then it makes the whole thing an exercise in code style.
As for how many times the test was run, it was randomized but but somewhere between ~60-100 times.
I know I've gotten myself into some hairy situations in the past by mistakenly extending things that were already extended, and unintended consequences are a concern even now.
I've got a hefty redesign due to launch in the near future, and I'm doing a lot of performance tuning. I've got ~300 includes (mostly media queries) and ~30 extends. This seems like an easy enough change to make right now for a quick, but small win.
I'm not so sure. Matching selectors to the DOM is a time consuming process. So more selectors, more time spent. I think parsing the rules is fast in comparison.
- https://github.com/t32k/stylestats - https://github.com/katiefenn/parker - http://www.webpagetest.org/