Skip to content

Optimize Jekyll image generation for weekly meetup archives to reduce build time #138

Description

@alexwolson

Summary

bundle exec jekyll build is spending significant time generating image derivatives for meetup event images on every build. As the number of weekly hacknight entries grows, build time increases linearly, which is inefficient for CI and local development.

Evidence

Recent build logs show repeated image generation work:

  • Many lines of Generating new image file: /events/hacknight_<n>-...
  • Build duration: done in 93.602 seconds
  • Repeated warning for missing image:
    • Jekyll Picture Tag Warning: JPT Could not find .../archives/images/events/hacknight_549.avif

Environment details from the same run:

  • Command: bundle exec jekyll build
  • Incremental build: disabled
  • Site uses jekyll_picture_tag and content from archives/images/

Why this is a problem

  • Build cost grows with historical content volume rather than only changed content.
  • Slower feedback loop for contributors running local builds.
  • Longer CI runtime and higher compute usage.
  • Missing asset warnings indicate extra work plus potential broken-image output.

Expected behavior

Builds should avoid regenerating unchanged image derivatives and only process new/changed source images, while still producing valid responsive assets.

Proposed investigation / implementation options

  1. Improve cache reuse for image derivatives

    • Verify jekyll_picture_tag cache behavior in CI and local builds.
    • Ensure any plugin cache directories are persisted across CI runs where possible.
    • Confirm deterministic source paths/config so cached assets are hit reliably.
  2. Avoid processing unchanged historical images

    • Audit picture-tag usage in templates to ensure we are not forcing regeneration.
    • Check whether generated derivatives can be keyed and reused for immutable historical hacknight images.
  3. Address missing source asset warnings

    • Identify references to hacknight_549.avif and either provide the source file or update front matter/template references to existing formats.
    • Add validation to catch missing referenced images earlier.
  4. Measure and document performance improvements

    • Capture baseline build timings and count of generated image files.
    • Compare before/after timing after cache/config changes.

Acceptance criteria

  • Unchanged content builds do not regenerate the full historical set of hacknight derivatives.
  • Build time for no-content-change runs is materially reduced (target to be defined during implementation).
  • No repeated missing-file warnings for referenced hacknight images.
  • CI and local developer workflow documentation updated if caching/config behavior changes.

Notes

Project context:

  • Content is in the archives/ submodule.
  • jekyll_picture_tag reads from archives/images/.
  • assets/thumbs/ is gitignored and regenerated at build time.

This issue focuses on reducing unnecessary image work while preserving current image output quality and compatibility.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions