Closed emilio closed 6 months ago
On a fastest computer and network it still takes few minutes every time you change any colour. Nobody can afford waiting times like that. It is the slowest Figma plugin I encountered.
Second that ^ changing anything on my themes and updating a library of components take ages....
Describe the bug https://m3.material.io/theme-builder#/dynamic is way slower than it needs to be. Investigating a Firefox bug report I noticed that the way you build your stylesheets is very suboptimal.
See the analysis and test-case there, but TLDR instead of appending to a stylesheet in the DOM one property at a time, you should either disable the stylesheet, build it, then enable it, or build a single text node.
To Reproduce Steps to reproduce the behavior:
Expected behavior It's fast.