Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 16 Builds very slowly #423

Closed
marionbarker opened this issue Oct 3, 2024 · 0 comments
Closed

Xcode 16 Builds very slowly #423

marionbarker opened this issue Oct 3, 2024 · 0 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file fixed in dev or pr

Comments

@marionbarker
Copy link
Contributor

Describe the bug

Initial builds with Xcode 16 are significantly (many minutes) slower than with Xcode 15. This happens for a new clone and any time an existing clone is reset using Product->Clean Build folder.

Refer to Loop Issue for more details

Loop Issue 2235: Xcode 16 Builds very slowly

Trio Issue

Trio does not use all 6 of the submodules modified to solve the slow build issue for Loop.
However, of the 4 affected modules that are used by Trio, the identical modification can be used.

These modules are:

  • LibreTransmitter
  • LoopKit
  • OmniBLE
  • OmniKit

As discussed in the Loop Issue, the settings for the ENABLE_MODULE_VERIFIER parameter were modified to be equal to a parameter set equal to not NO instead of hard coded to YES. Each module verification adds about 30 second to the initial build. For Trio, before the proposed modification for the 4 submodules, there were 8 modules verified in the 4 repositories.

Configuration

Build times reported in this Issue were obtained with

  • Trio dev, commit 023642a (0.2.1)
  • Apple M1 MacBook Pro
  • Xcode 16.0
  • macOS 14.6

The Trio fixed test used a local modification to Trio dev.

  • The 4 submodules were pointed to dnzxy:module-verify branch.

Timing Test

The timing for the build is taken from the Xcode tool.

  • All tests with Xcode 16.0
  • All initial builds preceded by Clean Build Folder, close workspace, open workspace
  • Use the menu sequence: Product, Perform Action, Build with Timing Summary
  • All times are reported in seconds
  • View the Build Timing Summary display

Note this does not include time to install the app or open the app on a phone or simulator.

Difference with respect to Loop

For those who read the Loop Issue in detail, you will notice that for Loop dev, the verify for the modules did not happen for the second build. This is not true for Trio dev.

  • I have no idea why the behavior is different and once this get fixed it won't matter
    • I am including this information for completeness
  • The timing reported for Trio is therefore for build 1, 2 and 3 after doing the clean build folder step
  • Multiple tests of a given configuration gave consistent results for the first and third builds
    • The second build varied over 3 repeated full trials
    • The time of the second build was consistent with how many Verify Modules were included
    • The number varied from 5 to 6, with the larger numbers taking longer (175 s vs 205 s)

Timing for dev and with the fix

Report build time in seconds for first, second and third builds in the table below.

Config Build # Time # Verify
Trio dev 1 370 8
Trio dev 2 195 5 or 6
Trio dev 3 8 0
Trio fixed 1 130 0
Trio fixed 2 12 0
Trio fixed 3 8 0

Timing Display for First Build: Trio dev

The graphic below shows and example timing display associated with the ENABLE_MODULE_VERIFIER = YES parameter for the first build for Trio dev after the clean build folder step.

timing-summary-trio-build-01

Timing Display for Second Build: Trio dev

The graphic below shows an example timing display associated with the ENABLE_MODULE_VERIFIER = YES parameter for the second build for Trio dev.

timing-summary-trio-build-02

Timing Display for First Build: Trio fix applied

The graphic below shows an example timing display for the initial build when the submodules have the suggested fix applied.

timing-summary-trio-fix-build-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file fixed in dev or pr
Projects
Status: Done
Development

No branches or pull requests

2 participants