Skip to content

Improve app build time: parallel builds and task deduplication#800

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/improve-app-build-time
Draft

Improve app build time: parallel builds and task deduplication#800
Copilot wants to merge 2 commits intomainfrom
copilot/improve-app-build-time

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

buildAll ran Android, iOS, and Library builds sequentially, and IsDependentOn declarations were never actually resolved — making dotnet restore a no-op dependency.

TaskRunner.csx — deduplication + dependency resolution

  • RunAsync now uses ConcurrentDictionary<string, Task>.GetOrAdd so each task executes at most once per session, even under concurrent callers
  • Dependencies declared via IsDependentOn are now resolved and awaited before the task body runs (multiple deps run in parallel via Task.WhenAll)

build.csx — parallel builds + correct iOS project

  • buildAll now fans out with Task.WhenAll instead of sequential RunAsync(string[]) — Android, iOS and Library builds run concurrently; init (restore) runs exactly once before all three proceed
  • Fixed buildiOS to target ComponentsPath (the Components app) instead of LibraryPath — consistent with buildAndroid and packageiOS
// Before
await TaskRunner.RunAsync(new[] { "buildAndroid", "buildiOS", "buildLibrary" }, false);

// After — init runs once, then all three build in parallel
await Task.WhenAll(
    TaskRunner.RunAsync("buildAndroid"),
    TaskRunner.RunAsync("buildiOS"),
    TaskRunner.RunAsync("buildLibrary")
);

Todos

  • I have tested on an Android device.
  • I have tested on an iOS device.
  • I have supported accessibility
Original prompt

Can you improve our app build time, look at the build folder to see how we build our apps.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…kRunner

Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve app build time by optimizing build process Improve app build time: parallel builds and task deduplication Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants