Slide 29
Slide 29 text
Things that are hard to get
right: performance
● The runtime nature of more complex polyfills can sometimes mean their
performance in browsers is significantly different to browsers that natively
support a feature, so this is always worth keeping an eye on.
● Historically, developers used solutions like Modernizr and Yepnope to
conditionally load polyfills in supported browsers, while in modern times
developers often take a lighter weight approach to checking (or defer to
configuration steps like present-env and conditional polyfill loading to handle
such checks for them).
● As the number of web platform features increases, the amount of polyfill code
required to make website developers' application code run in older browsers
may become extremely large - in some cases exceeding the size of the
application code that depends on it. This has implications for performance, both
in terms of parsing the polyfill code, and the time required to download it.
● Consideration should be given to whether excessively large polyfill bundles
place a punitive cost burden on users with the least ability to pay that cost:
those with older devices which may be on metered connections paying for data
in very small increments.