jacobrask / styledocco

Automatically generate a style guide from your stylesheets.
http://jacobrask.github.com/styledocco/
MIT License
1.06k stars 119 forks source link

Remove minify processes #105

Closed hokaccha closed 10 years ago

hokaccha commented 10 years ago

When the file size of CSS and JavaScript is large, minify processes are very slow.

In my project: (142.17s)

$ time styledocco path/to/src --include foo.js --include --bar.js
142.17s user 0.19s system 101% cpu 1.524 total

applied this patch: (1.35s)

$ time styledocco path/to/src --include foo.js --include --bar.js
1.35s user 0.19s system 101% cpu 1.524 total
marrs commented 10 years ago

Thanks for raising this issue. I've had a look at the code and the reason processing is so slow is because minification is happening at the map stage, for every file that is being compressed. If we do minification once at the end then you will see a big performance gain.

As for removing minification altogether, I feel that since Styledocco is a site generator, it should be able to handle minification itself, so I think we should keep that feature either as a command line option or as default.

So if you can modify your patch to put the minification after the map, that would be great.

hokaccha commented 10 years ago

I implemented minify option at #106, close this pull request.