How to speed up Stylus with a concat step

image

I recently ran into an issue where my Stylus grunt task was taking a long time to run (like 10+ seconds). I found that the main issue was the sheer number of styl files our project has (125 and counting) and the fact that we use nib.

Using a concat step (grunt-contrib-concat) to combine all styl files into one prior to compiling with stylus, I was able to reduce the processing time to around 3 seconds (a 70% increase in speed).

So if you use lots of stylus files and are finding it slow to process, give this technique a try.

Comments powered by Disqus
2 notes
  1. amwmedia posted this