Skip to content

Enable Codespaces prebuilds to speed up startup time #10

Description

@ShreyasKhandekar

Creating a new Codespace from this repository currently takes ~2 minutes because the dev container has to be set up from scratch each time (pulling the Chapel Docker image, installing extensions, etc.). For users who want to quickly try Chapel, this wait can be discouraging.

I want to consider using Codespaces prebuilds for the main branch. With a prebuild, GitHub builds and caches a snapshot of the dev container ahead of time. When a user creates a Codespace, it restores from the snapshot instead of rebuilding, which based on my understanding, should result in dropping startup to ~10–30 seconds.

Setup

  1. Go to Settings -> Codespaces for this repo.
  2. Click Set up prebuild.
  3. Select the main branch.
  4. Choose one or more regions.
  5. Set the trigger to On push (or On configuration change if preferred).

Cost (I'm not sure about this)

  • GitHub Actions minutes to build the prebuild: Supposed to be free for public repositories (see Actions billing docs).
  • Codespaces storage for the cached snapshot: This looks like it costs money, but its at $0.07/GB-month. In practice the cost should be negligible ($0.70/month if the image is 10GB) because:
    • Only one prebuild for the main branch.
    • The dev container configuration only changes when a new Chapel release comes out (~every 3 months), so the prebuild workflow rarely runs (I mean the actions are free anyway, we can also rebuild whenever there is a new version of the chapel extension)
    • Each new prebuild overwrites the previous snapshot, so storage doesn't accumulate.

Chapel may already have open source credits or a GitHub partnership that covers this — worth checking with our GitHub account contact.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions