4 ms·
Something I've noticed is that Dead Code Elimination for Javascript sucks. Yes, there are the (relatively) single "tree shaking" algorithms, but there because o
by EE84M3i 6y ago
Something I've noticed is that Dead Code Elimination for Javascript sucks. Yes, there are the (relatively) single "tree shaking" algorithms, but there because of various language issues, it's very hard to mark code as completely unused. Because of this it's extremely common to pull in a library and have a bunch of code that's never used in production!
- SV_BubbleTime 6y agoUnused code shouldn’t cause a performance issue though, should it? Isn’t this just a matter of downloading it, but never branching into?
- MereInterest 6y agoPerformance on the web is more than just runtime. That time spent downloading the Javascript and parsing it is part of the page's load time, even if the Javascript isn't executed.
- benaadams 6y agoNeed to both download and compile it