Use zstd compression?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, github-actions
- Domain
- build-system, ci-cd, devops
Research direction
Start in .github/workflows/docker.yml at the docker/build-push-action step that builds and pushes each version-architecture image. Review the existing image output settings, then validate a published image manifest and downstream pull behavior. Done means the relevant layers are zstd-compressed and the workflow still publishes all matrix images successfully.
Written by the indexing model from the issue text.
Description
Problem
Pulling ghcr.io/elementary/flatpak-platform/runtime:8 (and presumably the other version tags) in downstream CI consistently takes ~2m20s–2m30s, which dominates the total build job time (often >85% of it) for small consumer apps. Example from a real run building a small Vala app (checkout + full meson build + tests + flatpak bundle takes ~17s once the image is available):
- Job total: 2m47s
Initialize containers(docker pull) alone: 2m27s- Run log: https://github.com/peteruithoven/resizer/actions/runs/35536647952/job/98283252975
I inspected the published manifest for the 8 tag:
docker manifest inspect ghcr.io/elementary/flatpak-platform/runtime@sha256:84eabe1d28f1a8eda9e771b153759292c6b83bdde2d2b4f1f4eec22a0f605130
Two layers dominate the image, together ~2.3GB compressed, dwarfing the other ten layers combined (~720MB):
| digest (short) | compressed size | media type |
|---|---|---|
93a4a1aea6e7 |
1,268,644,102 bytes (1.27GB) | application/vnd.oci.image.layer.v1.tar+gzip |
192c972a8866 |
1,083,344,025 bytes (1.08GB) | application/vnd.oci.image.layer.v1.tar+gzip |
These correspond to the RUN flatpak install -y --noninteractive appcenter io.elementary.Platform/... io.elementary.Sdk/... step in docker.yml — i.e. an OSTree deployment (tens of thousands of small files) baked into a couple of plain tar layers.
Cross-referencing the CI logs: the network download of every layer finishes in ~15s (bandwidth isn't the bottleneck), but extraction (decompress + untar to disk) of just these two layers takes the other ~2 minutes.
Proposal
All layers currently use tar+gzip. Switching the pushed image to zstd-compressed layers should meaningfully cut this, since zstd decompresses roughly 2-5x faster than gzip at an equal or better compression ratio, and it's natively supported by the docker/build-push-action/buildx pipeline already used in docker.yml, e.g.:
- name: Build & push the ${{ matrix.version }}-${{ matrix.arch }} image
uses: docker/build-push-action@v7.3.0
with:
...
outputs: type=image,compression=zstd,compression-level=19,force-compression=true
This doesn't change anything about what's in the image (no compatibility risk for consumers), just how it's packed — so it seems low-risk relative to the payoff for every project building against this image.
Prior Art (Optional)
None found in this repo's issue tracker; closest related work is #234 (rebasing the base image to cut bloat) and #236 (fallout from that).
- Dominant language
- Meson
- Stars
- 57
- Forks
- 11
- Avg merge
- 6h 11m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elementary/flatpak-platform
-
Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elementary/flatpak-platform#254 ·
-
Priority: High
elementary/flatpak-platform#236 · 1 comment · 1 assignee ·
-
WebKitGTK Crash Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
elementary/flatpak-platform#228 ·
-
Priority: Wishlist
elementary/flatpak-platform#219 · 2 reactions · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
elementary/flatpak-platform#216 · 4 comments ·
All issues in elementary/flatpak-platform
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
Builders
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100