Polymer / polymer

Our original Web Component library.
https://polymer-library.polymer-project.org/
BSD 3-Clause "New" or "Revised" License
22.05k stars 2.02k forks source link

Remove use of Object.create on template info (significant perf impact). #5573

Closed kevinpschaaf closed 5 years ago

kevinpschaaf commented 5 years ago

The only reason Object.create was used here was to hand the template info its parent template info; since templateInfo is prototypical at this point, this made it an instance. For whatever reason, this caused a 5-10% performance regression on some benchmarks. The <template> node also acts as an instance that can carry this info, and doing so gets the performance back.