webpack-contrib/style-loader

Low performance when applyToSingletonTag

cenfun opened this issue · 2 comments

  • Operating System: Windows
  • Node Version: 14+
  • NPM Version: 6+
  • webpack Version: 5+
  • style-loader Version:^2.0.0 latest

Expected Behavior

high performance when load js in page

Actual Behavior

style-loader-low-performance
1, big size css file with fonts or images
2, many of css files
3, injectType: singletonStyleTag

Low performance when calls addStyle -> applyToSingletonTag -> insertBefore

DOM operations are very expensive, can we do only one last time insertBefore until all css content generated?

DOM operations are very expensive, can we do only one last time insertBefore until all css content generated?

What do you mean?

close