chfm / chfm.github.io

Chapel Hill Friends Meeting Website
https://www.chapelhillfriends.org
3 stars 0 forks source link

Newsletter archive slows jekyll #55

Closed finnjames closed 5 years ago

finnjames commented 5 years ago

I'm not completely sure why, but the rather large newsletter archive slows jekyll build times from ~4–5 seconds on my machine to about 20. For some reason before 579e0d7 this was not a concern. I suspect the new _config.yml file may be an issue, but honestly I don't know the solution. Any reason we cannot revert to the previous system of newsletter archive? Is the new system just to avoid filename/document structure redundancy?

finnjames commented 5 years ago

Few more notes: disabling the "defaults" info in the _config.yml fixes the issue, but (of course) breaks the newsletter page. I think the use of a wildcard character might be slowing things down a lot.

gugek commented 5 years ago

Yeah globbing is a slow build. If you are running local use the --incremental flag. Something like $ bundle exec jekyll serve --incremental. That should help deal with small changes you make to other files. The reason for we need to do this is because the original implementation broke all the indexing to the newsletters as John mentioned during the forum. This gets this back in to their original URLs.

Its a known Jekyll issue: https://jekyllrb.com/docs/configuration/front-matter-defaults/#glob-patterns-in-front-matter-defaults.

Keep the globs. It shouldn't scale much worse than it is now right now (30s-60s build time). We can set it up so newsletters next year can go into a sub directory without globs which might scale it better.

finnjames commented 5 years ago

Ahhh gotcha okay. --incremental doesn't help all that much, but it's something. If I have to do a lot of small edits at once I'll just temporarily disable the globs and reset them before pushing my changes.