less.js icon indicating copy to clipboard operation
less.js copied to clipboard

modifyVars really slow

Open itajaja opened this issue 9 years ago • 2 comments

I apologize if this is not the right repo. I am using the less loader in webpack and I pass a lot of variables to modifyVars (almost 60). passing these variables dramatically decreases the performance. What I also noticed is that the performance degrade linearly to the number of variables modified. I really don't think it's a webpack problem, because what the less loader does is just construct the command to pass to less but if necessary I can try to do it with bare less directly

itajaja avatar Sep 23 '16 16:09 itajaja

Yes, this is the right repo. That's not necessarily an expected behavior, so I'll mark as a bug.

matthew-dean avatar Sep 23 '16 19:09 matthew-dean

I wrote the original version of modifyVars - and a few years ago, I experimented with a condensed version of the rendering - meaning, it looked up all the lines / classes affected by variables passed, and rendered only those classes. The output would be the "override CSS" that is required to affect the intended changes.

Having said that - I don't think what the current status is for this function.

hakan-peltarion avatar Feb 03 '17 14:02 hakan-peltarion