-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entire site is rebuilt when making changes #1689
Comments
Ok, I did some more research/tinkering and here are my findings:
So deleting all those is apparently what it takes to get the incremental build time down to a reasonable level of about one second. Unfortunately, it also results in a website with no front page, no CSS, and 5 blog posts. It's particularly weird to me that processing everything in |
Ok, so I've discovered that something is silently disabling incremental regeneration. This can be shown by creating a require 'jekyll'
Jekyll::Hooks.register :site, :after_reset do |site|
puts "site.regenerator.disabled? == #{site.regenerator.disabled?}"
end On a fresh Jekyll site, running
However, on 18f.gsa.gov, it will print out:
That's not a typo--it actually says that incremental builds are enabled, but then something disables it at a later point. Next step is to figure out what's disabling it! |
Ok, I was quite confused because there appeared to be no way to disable the incremental regenerator from outside the class, but Jekyll::Hooks.register :site, :after_reset do |site|
# We need to disable incremental regen for Archives to generate with the
# correct content
site.regenerator.instance_variable_set(:@disabled, true)
end I'd issue a PR to at least display a warning that this is happening, as it would've saved me a lot of debugging time, but apparently there's a fix nearing completion at jekyll/jekyll-archives#58, so that's good at least. In the meantime, incremental regeneration can be enabled during development by temporarily commenting-out the |
Woah, interesting! I don't know that I would have guessed |
This is partially addressed, for local builds, anyway, with the coming redesign, thanks for the discussion. We're watching jekyll/jekyll-archives#58 for a merge on this. |
I noticed that the entire site seems to be rebuilt whenever I make changes to a file. For instance, the entire site takes 20 seconds to build when I start
./go serve
; yet the following actions seem to take another 20 seconds to regenerate the site:This is surprising, since
./go serve
runs jekyll with incremental build enabled. I did notice thatconfig.yml
contains the linefull_rebuild: true
, but commenting it out doesn't seem to change anything.I can reduce the time to about 8 seconds by running
jekyll serve --incremental --limit_posts 5
, but I'm not sure where that 8 seconds comes from. Will do some profiling to investigate more!The text was updated successfully, but these errors were encountered: