SRGSSR / pillarbox-apple

A next-generation reactive media playback ecosystem for Apple platforms.
https://testflight.apple.com/join/TS6ngLqf
MIT License
60 stars 10 forks source link

Check for possible build optimizations #1063

Closed defagos closed 2 weeks ago

defagos commented 2 weeks ago

As a developer integrating Pillarbox I would like Pillarbox to compile quickly so that the associated footprint is minimal. As a Pillarbox developer I would like Pillarbox to compile as fast as possible, demo included, so that I can be more efficient when building from scratch or for CI purposes.

Acceptance criteria

Tasks

defagos commented 2 weeks ago

We can tweak warnings for long compilation times by locally adding the following flags to our Package.swift manifest:

swiftSettings: [
    .unsafeFlags(["-Xfrontend", "-warn-long-function-bodies=100"]),
    .unsafeFlags(["-Xfrontend", "-warn-long-expression-type-checking=100"])
]

Same by adding the flags to the Pillarbox demo settings.

There is no severe issue with the current code. Everything compiles fine.

defagos commented 2 weeks ago

On my M1 Max the overhead associated with the inclusion of Pillarbox and its dependencies in a minimal project is ~5 seconds.

defagos commented 2 weeks ago

Should be pretty much under control for the moment. Closed.