6 ms·
Do web components have a chance when a polyfills are required for iOS? Does anyone have any experience w/ Polymer performance on iOS?
by mrisse 11y ago
Do web components have a chance when a polyfills are required for iOS? Does anyone have any experience w/ Polymer performance on iOS?
- trevordixon 11y agoPolymer 1.0 uses "Shady DOM" instead of a full shadow DOM polyfill. According to https://www.polymer-project.org/1.0/articles/shadydom.html https://www.polymer-project.org/1.0/articles/shadydom.html, "Many projects simply cannot afford the Shadow DOM Polyfill, for the reasons given above. In particular, the performance costs on platforms like mobile Safari are nearly intolerable." "Polyfilling shadow DOM is hard, the robust polyfill is invasive and slow. Shady DOM is a super-fast shim for shadow DOM that provides tree-scoping, but has drawbacks. Most importantly, one must use the shady DOM APIs to work with scoped trees." So it sounds like this lighter, less complete Shady DOM half-polyfill that 1.0 uses is specifically made to make performance acceptable on iOS.
- spankalee 11y agoExactly. Performance under iOS is great with Shady DOM, at the expense of needing to use its APIs to get the effects of DOM scoping and composition.
- spankalee 11y agoThere has been major progress on getting all browser vendors to agree on Shadow DOM. It sounds like the final details will be hammered out soon (this summer) and implementation will start shortly after that.
- rictic 11y agoGetting good performance out of iOS was a major focus for v0.8 - thus the shady dom. They got >5x faster performance: https://blog.polymer-project.org/updates/2015/03/27/why-0.8/ https://blog.polymer-project.org/updates/2015/03/27/why-0.8/