Skip to content

[ShadyCSS] :host() selector containing multiple elements extremely slow when first element has a long name #13

Open
@eriklumme

Description

@eriklumme

Complete example

<link rel="import" href="../polymer/polymer-element.html">

<dom-module id="theme-bug">
  <template>
    <style>
      :host(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, a) {
      }
    </style>
  </template>

  <script>
    class ThemeBug extends Polymer.Element {
      static get is() { return 'theme-bug'; }
    }

    window.customElements.define(ThemeBug.is, ThemeBug);
  </script>
</dom-module>

When there are two elements within :host(), and the length of the first gets to around 20-30 characters, the page loading time gets slow to the point that e.g. Firefox freezes completely.

If the order of the long and short names are reversed, this is not an issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions