Skip to content

[ShadyCSS] App loading performance issue in Chrome <= 45 #257

Open
@vadzimdubina

Description

@vadzimdubina

Description

We started using WebComponents in our apps and for apps built with Chromium <= 45 we experienced app loading performance issue. Application loading time increased from 2-5 seconds to 2-5 minutes. With Chrome performance tool we found that this regex takes a lot of time:

varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,

Is there any reason why we can't simplify css-property selector from [^;:]*? to [\w\s\d-]*?? It increases performance even in up-to-date browsers: https://jsbench.me/dsk62aojjg/1

Browsers Affected

  • Chrome
  • Firefox
  • Edge
  • Safari
  • IE 11

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