Blazor AOT build time on Azure DevOps nearing 2 hours
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- azure, csharp, wasm
- Domain
- build-system, cloud, performance
Research direction
Start by reproducing the Blazor Web.Client build with RunAOTCompilation enabled on an Azure DevOps windows-latest agent, focusing on the wasm AOT compile step. Compare the reported timings with the 16-core managed agent and investigate existing AOT build-time tracking work; done means a confirmed bottleneck, improvement, or linked plan for reducing compile time.
Written by the indexing model from the issue text.
Description
Description
I have a Blazor Web project which I build/deploy through Azure DevOps (using Aspire/azd tools).
I've found that to get reasonable UI performance with certain third party UI chart controls where there is a lot of user interaction and JS interop, I need to use AOT compilation with this in my Web.Client project file:
<PropertyGroup>
<RunAOTCompilation>true</RunAOTCompilation>
<WasmStripILAfterAOT>false</WasmStripILAfterAOT>
</PropertyGroup>
The build/deploy time for my Blazor web app with AOT compilation enabled with a standard 'windows-latest' agent on Azure DevOps has crept up to nearly 2 hours which seems pretty crazy. It looks locally like its spending most of it's time in the wasm aot compile step.
I've used Azure Managed agent pools to get an on demand 16 core machine as an agent and that brings the build time down to about half an hour, which still seems like quite a long time.
Overall, this issue does make deploying the end to end microsoft web tech stack (.NET, Blazor, Azure DevOps, Azure) both slow but also very power hungry and therefore wasteful from an energy/CO2 perspective. As such, I hope it's something you can prioritize. I've no idea how many of your customers are trying to do the same, but it would be good to get the time/energy down.
Is there anything in the pipeline or ticket I can track for improvements to Blazor AOT compile time?
I'm going to experiment with the 'EmccLinkOptimizationFlag' elements I've found in another thread to see how that effects the balance of compile time vs. size and performance, but I'm hoping there's something more fundamental in the works.
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
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 dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·