4 ms·
It's more than one unnecessary level of nesting in the DOM, it's that they're creating an entirely separate DOM tree they aren't using. I threw together a test
by jjcm 6y ago
It's more than one unnecessary level of nesting in the DOM, it's that they're creating an entirely separate DOM tree they aren't using. I threw together a test using tachometer to demonstrate the differences: https://github.com/jjcm/shadowTests https://github.com/jjcm/shadowTests
The results are here: https://raw.githubusercontent.com/jjcm/shadowTests/master/result.png https://raw.githubusercontent.com/jjcm/shadowTests/master/re...
TL;DR - the withShadow element takes about twice as long to render as the withoutShadow element. Don't use them unnecessarily.