Skip to content

ci: Flatpak build takes ~17 min; where the time goes #651

Closed

Description

@zackees

Measurements

Build / Flatpak job on the last 10 master pushes (all full runs, warm dependency cache): 12.3 to 20.1 min, median ~17 min (15.7, 12.3, 17.2, 20.1, 18.8, 18.3, 17.0, 15.9, 15.1, 17.9).

Per-step breakdown of run 38351747332 (15.7 min job; "Build Flatpak Manifest" step 781 s, bundle build on):

Phase Time
Initialize containers (pull flatpak-github-actions:freedesktop-26.08) 48 s
Prepare build space (runner cleanup) 63 s (up to 110 s)
checkout + manifest lint 15 s
cache restore (ccache 1 s + builder dir 22 s) 23 s
flatpak-builder: install SDK/Platform from flathub, dep module cache check 42 s
source download 13 s
obs module: cmake configure + 695 ninja steps (ccache) ~95 s (05:34:27 to 05:36:01)
flatpak-builder debuginfo split/compress of every binary ~3.5 min (05:36:21 to 05:39:50)
commit build/cleanup/finish stages to cache ~50 s
export app + Debug ref to repo (591 MB + 1.3 GB) ~70 s
flatpak build-bundle (package=true only) ~4 min (05:41:51 to 05:45:55)
artifact upload ~5 s
AppStream/builddir/repo validators ~20 s

Run 38349228217 was 584 s in the builder step, 38344380205 was 1002 s.

Where the time does not go

  • Dependency modules are not rebuilt. obs-deps-buildstream-* and cef are prebuilt tarballs, and the log shows Cache hit for ..., skipping build for all five. The flatpak-builder dir is cached under the manifest hash and ccache is cached under a commit key (already restored from master).
  • Rust is not part of this build. The manifest has no ENABLE_RUST_LIBOBS, Corrosion or cargo (grep -ni 'rust\|cargo\|corrosion' build-aux/com.obsproject.Studio.json finds only obs-rust download URLs). So soldr/zccache have nothing to cache here today. If the Flatpak ever builds libobs-rust, that needs its own look (the sandbox has no network and no soldr).
  • Compiling is ~95 s when ccache is warm.

Where it goes

  1. build-bundle runs on every push to master (package=true) and nobody consumes the bundle except testers; ~4 min of ~16.
  2. Debuginfo extraction for the Debug extension, ~3.5 min, single threaded in flatpak-builder. Not removable without changing what ships (the action has no way to pass --disable-debuginfo-style args).
  3. Image pull + runner prep ~2 min, SDK install from flathub ~40 s.

Plan

  • Build the bundle only where it is consumed (schedule/daily release, tags, release branches, Seeking Testers PRs), not on every master push. Saves ~4 min per push.
  • Keep the manifest-hash dep cache and commit-keyed ccache as they are (keys already include the manifest hash; sources are built every time since obs is a dir source).
  • Report cold vs warm in the PR.

Activity

  1. added
    claimed
    on Oct 13, 2026
  2. zackees commented on Oct 14, 2026

    @zackees
    MemberAuthor

    Measured results and root cause (cold PRs ran without --ccache) are in #654 (comment). Rust is not part of the Flatpak build, so soldr/zccache do not apply.

  3. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Release gate run 38911188146 (schedule, master): Flatpak 19 min, Build Flatpak Manifest 1047 s, ccache 2/672 hits with "Cache not found" for flatpak-ccache-x86_64-*. The restore/save logic is right; the master entry had been evicted while the repo's caches sat at 11.4 GB > 10 GB, overflowed by per-PR Tier 2 apt entries (fixed in #1077, which saves only on master). That run saved flatpak-ccache-x86_64-0ce75332… (166 MB, master) at 14:11, so the next release gate should restore it; I'll post its hit rate and build time here. Refs #930.

  4. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Measured on full run 38936650968 (dispatch, master): Flatpak restored flatpak-ccache-x86_64-0ce75332…, ccache 651/1344 hits (48%) vs 2/672 before; Build Flatpak Manifest 1047 s → 499 s; job 19 min → 9.9 min. The misses are the commits since that cache; the next run that restores this run's save should hit higher.

  5. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Closing: with the master ccache restored the Flatpak job is 9.9 min (run 38936650968; build step 1047 → 499 s, ccache 48% vs 0.3%), and it no longer runs on PRs or master pushes (#436, #654). The 17–19 min runs were cold caches; #1077 keeps the repo under its 10 GB cache limit so the entry isn't evicted again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions