SomMeri / less4j

Less language is an extension of css and less4j compiles it into regular css. Less adds several dynamic features into css: variables, expressions, nested rules, and so on. Less was designed to be compatible with css and any correct css file is also correct less file.
145 stars 47 forks source link

CustomFunctions.evaluate clones too much #348

Open a701440 opened 8 years ago

a701440 commented 8 years ago

Is it possible to avoid cloning a lot of AST in the CustomFunctions.evaluate. It appears that even for simple functions that don't use most of the arguments a lot of inefficient cloning is taking place. Perhaps this could be a configuration option. This way authors of custom functions could clone internally if needed when this option is set to false. Actually it's not clear why cloning is needed. Standard function packages don't seem to clone.