webpack-theme-color-replacer
webpack-theme-color-replacer copied to clipboard
[性能问题] setToCss耗时过长
function setCssTo(cssText) {
cssText = _this.replaceCssText(cssText, oldColors, newColors)
elStyle.innerText = cssText
}
setCssTo Total Time 2.55 s Self Time 2.50 s setCssTo @ themeColorChangerjs:73:30 elStyle.innerText = cssText cssText大小约600k 直接赋值覆盖css样式 导致DOM渲染阻塞
这么多css吗?光是含颜色值的都有600k。css需要整理重构,搞一些公共样式出来