philnash / jekyll-gzip

Generate gzipped assets and files for your Jekyll site at build time
https://rubygems.org/gems/jekyll-gzip
MIT License
37 stars 8 forks source link

Support incremental builds #7

Closed fauno closed 4 years ago

fauno commented 4 years ago

Avoid gzipping files when they don't need to by checking Jekyll's regeneration cache and keeping .gz files from the site to prevent cleaning.

fauno commented 4 years ago

Hi, I needed this for a big site and reduced build times from 150 to 11 seconds (including jekyll-brotli, which I'm sending a PR next)

I realized in the cleanup hook I should be checking if the site is being incrementally built, but Jekyll only passes a Set of paths to it...

philnash commented 4 years ago

This would be great! Reducing build time is a great (and something I'd like to add to another plugin that I haven't published yet). Will check it out soon. Thanks!

fauno commented 4 years ago

made some changes since i noticed archives weren't getting updated :)

philnash commented 4 years ago

Thanks for this! I've just got around to merging it. I'll release a new version soon too. And I'll get this through the brotli version too.

philnash commented 4 years ago

Ok, this is released as 2.4.0, and then also 2.4.1 with better testing and coverage of the feature. Also, jekyll-brotli 2.2.0 is out with support and I added the same feature to jekyll-zopfli as version 2.4.0.

fauno commented 4 years ago

Hi, great! Thanks! And thanks for your work, we've been using your plugins in production for Sutty :)