sass-svg is slow when compiling ~35 svgs
JoshLipps opened this issue · 2 comments
When I try to build ~35 svgs(very simple 1-2 paths a piece) using this plugin it takes ~ 1:30 minutes. I would love to use this type of thing in our project but I think I'll have to just create mixins that contain the pre-encoded SVG datauris which accept params for fill colors.
If you have any suggestions/solutions for speed increase I'd love to hear about it.
Thanks for the report, @JoshLipps - Are you using Ruby Sass or Libsass? Also, are your SVGs exactly the same, or are each of them different?
Also, can you please send me your SCSS code? It would be great to benchmark it.
EDIT: @JoshLipps if your SVGs are the same or very similar, I can see the benefit into memoizing _encode
, which probably takes the longest amount of time. Would this be useful? See http://davidkpiano.github.io/sassdash/sassdoc/index.html#function-_memoize