webcomponents / webcomponents/polyfills
[ShadyCSS] App loading performance issue in Chrome <= 45
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
### 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: https://github.com/webcomponents/polyfills/blob/78c69a568de9a75adaf599b1146ead5787956a36/packages/shadycss/src/css-parse.js#L257
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
- [x] Chrome
- [ ] Firefox
- [ ] Edge
- [ ] Safari
- [ ] IE 11
Contributor guide
Assessment
This issue has not been assessed yet.