Skip to content

Support build caching / not rebuilding images if they already exist? #125

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Coming over from flint-fyi/flint#1781 (comment): I'm seeing astro-og-canvas:

  • Rebuilds images even if they already exist in the output og/ directory
  • Runs a lot slower in GitHub Actions CI (guessing: for lack of fancy Mac M# chips / GPUs)

Combined, that's resulting in the repo's builds taking an extra 15+ seconds in CI to rebuild a little under 100 images (~170ms/image average). Once our repo gets up to its projected ~1000 images by the end of 2025, that'll be ~5 minutes in CI for every build.

Proposal: could astro-og-canvas have some kind of caching feature? For example, could it keep a hash/registry on disk of images to be built, and only (re)build images when there is a missing cache or mismatch?

(alternately, if there's a more Astro-native solution we should be using, I'd love to know! and maybe add that to docs here?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions