Closed piranha closed 7 years ago
Nice!
I was thinking of adding an optimization layer that could merge/shorten consecutive strings and this is a great first step.
To be honest, it would also be nice to create a function which will convert [(str "a: " x ";\n") (str "b: " y ";\n")]
into [(str "a: " x ";\n b: " y ";\n")]
, it'll be just a little bit more general - maybe a bit more work, like flatten or something - it certainly needs to unroll join. But I just understood that, what I did was much easier, but much less general - joining strings will not cross the borders, unfortunately, and a single variable will break all those optimizations. :-))
This branch adds few modifications which make forest compile stylesheets to this:
rather than current version:
This obviously speeds up loading a bit plus reduces file size (even with advanced minification). I guess it could be improved further, so that if a single variable is used, everything except for this one variable is converted to a string - but that is a little bit more work. :)