-
Notifications
You must be signed in to change notification settings - Fork 531
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
LinkAssembliesNoShrink
is expensive
#8421
Comments
I tried to see if I could repo but the app does not build using
|
It's strange. It's building perfectly fine in CI. What exception did XamlCodeGeneration throw? One thing I noticed is that this task might be doing extra work because we are building in Release where AddKeepAlives is true. So I was suspecting this to be what is taking lots of time. I blindly opened a performance optimization but it might still not be where the task is spending most of its time #8422. |
LinkAssembliesNoShrink
is expensive and is run LinkAssembliesNoShrink
is expensive
|
Ah, |
Note: Setting |
Context: dotnet#8421 Reviewing the build log from: dotnet new maui dotnet build -f net8.0-android -bl I noticed: LinkAssembliesNoShrink 3.410s ... Failed to read 'C:\Program Files\dotnet\packs\Microsoft.Android.Runtime.34.android-arm64\34.0.52\runtimes\android-arm64\lib\net8.0\Mono.Android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'C:\Program Files\dotnet\packs\Microsoft.Android.Runtime.34.android-arm64\34.0.52\runtimes\android-arm64\lib\net8.0\Java.Interop.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.controls.compatibility\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Controls.Compatibility.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.controls.core\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Controls.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.core\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.appcompat\1.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.AppCompat.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.fragment\1.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Fragment.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.drawerlayout\1.2.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.DrawerLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.activity\1.7.2.1\lib\net6.0-android31.0\Xamarin.AndroidX.Activity.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.core\1.10.1.2\lib\net6.0-android31.0\Xamarin.AndroidX.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.recyclerview\1.3.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.RecyclerView.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.viewpager\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.ViewPager.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.swiperefreshlayout\1.1.0.14\lib\net6.0-android31.0\Xamarin.AndroidX.SwipeRefreshLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.cardview\1.0.0.21\lib\net6.0-android31.0\Xamarin.AndroidX.CardView.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.google.android.material\1.9.0.2\lib\net6.0-android31.0\Xamarin.Google.Android.Material.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.viewpager2\1.0.0.21\lib\net6.0-android31.0\Xamarin.AndroidX.ViewPager2.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.coordinatorlayout\1.2.0.7\lib\net6.0-android31.0\Xamarin.AndroidX.CoordinatorLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.graphics\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Graphics.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.fragment\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Fragment.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.essentials\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Essentials.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.collection\1.2.0.9\lib\net6.0-android31.0\Xamarin.AndroidX.Collection.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.vectordrawable.animated\1.1.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.VectorDrawable.Animated.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.common\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Common.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.viewmodel\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.ViewModel.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.savedstate\1.2.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.SavedState.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.activity.ktx\1.7.2.1\lib\net6.0-android31.0\Xamarin.AndroidX.Activity.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.annotation.experimental\1.3.1.1\lib\net6.0-android31.0\Xamarin.AndroidX.Annotation.Experimental.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.annotation.jvm\1.6.0.2\lib\net6.0-android31.0\Xamarin.AndroidX.Annotation.Jvm.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.appcompat.appcompatresources\1.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.AppCompat.AppCompatResources.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.arch.core.common\2.2.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Arch.Core.Common.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.arch.core.runtime\2.2.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Arch.Core.Runtime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.browser\1.5.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Browser.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.collection.ktx\1.2.0.9\lib\net6.0-android31.0\Xamarin.AndroidX.Collection.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.concurrent.futures\1.1.0.14\lib\net6.0-android31.0\Xamarin.AndroidX.Concurrent.Futures.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.constraintlayout\2.1.4.6\lib\net6.0-android31.0\Xamarin.AndroidX.ConstraintLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.constraintlayout.core\1.0.4.6\lib\net6.0-android31.0\Xamarin.AndroidX.ConstraintLayout.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.versionedparcelable\1.1.1.19\lib\net6.0-android31.0\Xamarin.AndroidX.VersionedParcelable.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.core.core.ktx\1.10.1.2\lib\net6.0-android31.0\Xamarin.AndroidX.Core.Core.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.cursoradapter\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.CursorAdapter.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.customview\1.1.0.18\lib\net6.0-android31.0\Xamarin.AndroidX.CustomView.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.customview.poolingcontainer\1.0.0.5\lib\net6.0-android31.0\Xamarin.AndroidX.CustomView.PoolingContainer.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.documentfile\1.0.1.19\lib\net6.0-android31.0\Xamarin.AndroidX.DocumentFile.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.dynamicanimation\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.DynamicAnimation.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.emoji2\1.3.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Emoji2.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.startup.startupruntime\1.1.1.7\lib\net6.0-android31.0\Xamarin.AndroidX.Startup.StartupRuntime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.emoji2.viewshelper\1.3.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Emoji2.ViewsHelper.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.exifinterface\1.3.6.2\lib\net6.0-android31.0\Xamarin.AndroidX.ExifInterface.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.fragment.ktx\1.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Fragment.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.interpolator\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Interpolator.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.legacy.support.core.utils\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Legacy.Support.Core.Utils.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.livedata\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.LiveData.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.livedata.core\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.LiveData.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.livedata.core.ktx\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.LiveData.Core.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.process\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Process.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.runtime\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Runtime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.runtime.ktx\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Runtime.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.viewmodel.ktx\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.ViewModel.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.viewmodelsavedstate\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.loader\1.1.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Loader.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.localbroadcastmanager\1.1.0.7\lib\net6.0-android31.0\Xamarin.AndroidX.LocalBroadcastManager.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.common\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Common.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.runtime\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Runtime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.ui\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.UI.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.print\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Print.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.profileinstaller.profileinstaller\1.3.1.2\lib\net6.0-android31.0\Xamarin.AndroidX.ProfileInstaller.ProfileInstaller.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.resourceinspection.annotation\1.0.1.7\lib\net6.0-android31.0\Xamarin.AndroidX.ResourceInspection.Annotation.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.savedstate.savedstate.ktx\1.2.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.SavedState.SavedState.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.security.securitycrypto\1.1.0.1-alpha06\lib\net6.0-android31.0\Xamarin.AndroidX.Security.SecurityCrypto.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.slidingpanelayout\1.2.0.7\lib\net6.0-android31.0\Xamarin.AndroidX.SlidingPaneLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.tracing.tracing\1.1.0.6\lib\net6.0-android31.0\Xamarin.AndroidX.Tracing.Tracing.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.transition\1.4.1.12\lib\net6.0-android31.0\Xamarin.AndroidX.Transition.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.vectordrawable\1.1.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.VectorDrawable.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.window\1.1.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Window.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.window.extensions.core.core\1.0.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Window.Extensions.Core.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. In general, it doesn't feel like we need `Mono.Cecil` to load symbols at all for this task. That feels like it would be useful for `Release` mode that is doing *real* trimming, but not in debug mode. I disabled symbol loading in this task, but left a private `$(_AndroidLinkAssembliesReadSymbols)` as an escape hatch if this is ever needed. This should avoid 74 exceptions that were try-catch'd in the build log.
…ls (#8571) Context: #8421 Reviewing the build log from: dotnet new maui dotnet build -f net8.0-android -bl I noticed: LinkAssembliesNoShrink 3.410s ... Failed to read 'C:\Program Files\dotnet\packs\Microsoft.Android.Runtime.34.android-arm64\34.0.52\runtimes\android-arm64\lib\net8.0\Mono.Android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'C:\Program Files\dotnet\packs\Microsoft.Android.Runtime.34.android-arm64\34.0.52\runtimes\android-arm64\lib\net8.0\Java.Interop.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.controls.compatibility\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Controls.Compatibility.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.controls.core\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Controls.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.core\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.appcompat\1.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.AppCompat.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.fragment\1.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Fragment.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.drawerlayout\1.2.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.DrawerLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.activity\1.7.2.1\lib\net6.0-android31.0\Xamarin.AndroidX.Activity.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.core\1.10.1.2\lib\net6.0-android31.0\Xamarin.AndroidX.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.recyclerview\1.3.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.RecyclerView.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.viewpager\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.ViewPager.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.swiperefreshlayout\1.1.0.14\lib\net6.0-android31.0\Xamarin.AndroidX.SwipeRefreshLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.cardview\1.0.0.21\lib\net6.0-android31.0\Xamarin.AndroidX.CardView.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.google.android.material\1.9.0.2\lib\net6.0-android31.0\Xamarin.Google.Android.Material.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.viewpager2\1.0.0.21\lib\net6.0-android31.0\Xamarin.AndroidX.ViewPager2.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.coordinatorlayout\1.2.0.7\lib\net6.0-android31.0\Xamarin.AndroidX.CoordinatorLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.graphics\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Graphics.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.fragment\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Fragment.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\microsoft.maui.essentials\8.0.3\lib\net8.0-android34.0\Microsoft.Maui.Essentials.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.collection\1.2.0.9\lib\net6.0-android31.0\Xamarin.AndroidX.Collection.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.vectordrawable.animated\1.1.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.VectorDrawable.Animated.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.common\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Common.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.viewmodel\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.ViewModel.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.savedstate\1.2.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.SavedState.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.activity.ktx\1.7.2.1\lib\net6.0-android31.0\Xamarin.AndroidX.Activity.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.annotation.experimental\1.3.1.1\lib\net6.0-android31.0\Xamarin.AndroidX.Annotation.Experimental.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.annotation.jvm\1.6.0.2\lib\net6.0-android31.0\Xamarin.AndroidX.Annotation.Jvm.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.appcompat.appcompatresources\1.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.AppCompat.AppCompatResources.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.arch.core.common\2.2.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Arch.Core.Common.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.arch.core.runtime\2.2.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Arch.Core.Runtime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.browser\1.5.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Browser.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.collection.ktx\1.2.0.9\lib\net6.0-android31.0\Xamarin.AndroidX.Collection.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.concurrent.futures\1.1.0.14\lib\net6.0-android31.0\Xamarin.AndroidX.Concurrent.Futures.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.constraintlayout\2.1.4.6\lib\net6.0-android31.0\Xamarin.AndroidX.ConstraintLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.constraintlayout.core\1.0.4.6\lib\net6.0-android31.0\Xamarin.AndroidX.ConstraintLayout.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.versionedparcelable\1.1.1.19\lib\net6.0-android31.0\Xamarin.AndroidX.VersionedParcelable.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.core.core.ktx\1.10.1.2\lib\net6.0-android31.0\Xamarin.AndroidX.Core.Core.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.cursoradapter\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.CursorAdapter.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.customview\1.1.0.18\lib\net6.0-android31.0\Xamarin.AndroidX.CustomView.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.customview.poolingcontainer\1.0.0.5\lib\net6.0-android31.0\Xamarin.AndroidX.CustomView.PoolingContainer.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.documentfile\1.0.1.19\lib\net6.0-android31.0\Xamarin.AndroidX.DocumentFile.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.dynamicanimation\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.DynamicAnimation.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.emoji2\1.3.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Emoji2.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.startup.startupruntime\1.1.1.7\lib\net6.0-android31.0\Xamarin.AndroidX.Startup.StartupRuntime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.emoji2.viewshelper\1.3.0.3\lib\net6.0-android31.0\Xamarin.AndroidX.Emoji2.ViewsHelper.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.exifinterface\1.3.6.2\lib\net6.0-android31.0\Xamarin.AndroidX.ExifInterface.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.fragment.ktx\1.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Fragment.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.interpolator\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Interpolator.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.legacy.support.core.utils\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Legacy.Support.Core.Utils.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.livedata\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.LiveData.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.livedata.core\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.LiveData.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.livedata.core.ktx\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.LiveData.Core.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.process\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Process.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.runtime\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Runtime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.runtime.ktx\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.Runtime.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.viewmodel.ktx\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.ViewModel.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.lifecycle.viewmodelsavedstate\2.6.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.Lifecycle.ViewModelSavedState.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.loader\1.1.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Loader.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.localbroadcastmanager\1.1.0.7\lib\net6.0-android31.0\Xamarin.AndroidX.LocalBroadcastManager.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.common\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Common.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.runtime\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Runtime.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.navigation.ui\2.6.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.UI.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.print\1.0.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.Print.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.profileinstaller.profileinstaller\1.3.1.2\lib\net6.0-android31.0\Xamarin.AndroidX.ProfileInstaller.ProfileInstaller.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.resourceinspection.annotation\1.0.1.7\lib\net6.0-android31.0\Xamarin.AndroidX.ResourceInspection.Annotation.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.savedstate.savedstate.ktx\1.2.1.3\lib\net6.0-android31.0\Xamarin.AndroidX.SavedState.SavedState.Ktx.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.security.securitycrypto\1.1.0.1-alpha06\lib\net6.0-android31.0\Xamarin.AndroidX.Security.SecurityCrypto.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.slidingpanelayout\1.2.0.7\lib\net6.0-android31.0\Xamarin.AndroidX.SlidingPaneLayout.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.tracing.tracing\1.1.0.6\lib\net6.0-android31.0\Xamarin.AndroidX.Tracing.Tracing.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.transition\1.4.1.12\lib\net6.0-android31.0\Xamarin.AndroidX.Transition.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.vectordrawable\1.1.0.19\lib\net6.0-android31.0\Xamarin.AndroidX.VectorDrawable.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.window\1.1.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Window.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. Failed to read 'D:\.nuget\packages\xamarin.androidx.window.extensions.core.core\1.0.0.1\lib\net6.0-android31.0\Xamarin.AndroidX.Window.Extensions.Core.Core.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. In general, it doesn't feel like we need `Mono.Cecil` to load symbols at all for this task. That feels like it would be useful for `Release` mode that is doing *real* trimming, but not in debug mode. Generally, we don't think anyone will be debugging the assemblies changed in this `<LinkAssembliesNoShrink/>` task. They would likely be old, precompiled assemblies from NuGet if they need to be fixed up. Some other issues were discovered here, addressing in: dotnet/java-interop#1176 I disabled symbol loading in this task, but left a private `$(_AndroidLinkAssembliesReadSymbols)` as an escape hatch if this is ever needed. This should avoid 74 exceptions that were try-catch'd in the build log.
So, are we testing The However,
I was going to look into skipping @Youssef1313 do you have a |
@Youssef1313 your picture above is Do you have trimming disabled in this app? |
Yes, they do:
|
@jonpryor Yes, it's the release build in CI. |
Context: dotnet#8421 Working a bit on build performance, I tested: * `dotnet new maui` * `dotnet build -bl` The `.binlog` shows: LinkAssembliesNoShrink 3.797s Attaching `dotnet-trace` as mentioned on: https://github.com/xamarin/xamarin-android/blob/2f192386e8072f8e0ecaf0de2fe48654f3ade423/Documentation/guides/tracing.md#how-to-dotnet-trace-our-build I see time broken down such as: FixAbstractMethods: 37% AssemblyDefinition.Write: 27% ProcessAssemblyDesigner: 20% CopyIfChanged: 13% DirectoryAssemblyResolver.GetAssembly: 4.4% This made me focus in on `FixAbstractMethodsStep` and make the following changes: * All calls for `TypeReference.Resolve()` and `MethodReference.Resolve()` should go through the `TypeDefinitionCache` to avoid repeated lookups. * `IsInOverrides()` can compare the `MethodReference.Name` before calling `Resolve()`. It could resolve many unnecessary methods otherwise. After these changes, I instead see from `dotnet-trace`: ``` --1.45s (3.7%) xamarin.android.build.tasks!MonoDroid.Tuner.FixAbstractMethodsStep.FixAbstractMethods() ++949.70ms (2.5%) xamarin.android.build.tasks!MonoDroid.Tuner.FixAbstractMethodsStep.FixAbstractMethods() ``` Time is now broken down differently, such as: AssemblyDefinition.Write: 31% FixAbstractMethods: 28% ProcessAssemblyDesigner: 23% CopyIfChanged: 12% DirectoryAssemblyResolver.GetAssembly: 4.8% In an overall `.binlog` (without `dotnet-trace` attached): ``` --LinkAssembliesNoShrink 3.797s ++LinkAssembliesNoShrink 3.105s ``` This saved ~700ms on initial build of a new MAUI project.
…8650) Context: #8421 Working a bit on build performance, I tested: * `dotnet new maui` * `dotnet build -bl` The `.binlog` shows: LinkAssembliesNoShrink 3.797s Attaching `dotnet-trace` as mentioned on: https://github.com/xamarin/xamarin-android/blob/2f192386e8072f8e0ecaf0de2fe48654f3ade423/Documentation/guides/tracing.md#how-to-dotnet-trace-our-build I see time broken down such as: FixAbstractMethods: 37% AssemblyDefinition.Write: 27% ProcessAssemblyDesigner: 20% CopyIfChanged: 13% DirectoryAssemblyResolver.GetAssembly: 4.4% This made me focus in on `FixAbstractMethodsStep` and make the following changes: * All calls for `TypeReference.Resolve()` and `MethodReference.Resolve()` should go through the `TypeDefinitionCache` to avoid repeated lookups. * `IsInOverrides()` can compare the `MethodReference.Name` before calling `Resolve()`. It could resolve many unnecessary methods otherwise. After these changes, I instead see from `dotnet-trace`: --1.45s (3.7%) xamarin.android.build.tasks!MonoDroid.Tuner.FixAbstractMethodsStep.FixAbstractMethods() ++949.70ms (2.5%) xamarin.android.build.tasks!MonoDroid.Tuner.FixAbstractMethodsStep.FixAbstractMethods() Time is now broken down differently, such as: AssemblyDefinition.Write: 31% FixAbstractMethods: 28% ProcessAssemblyDesigner: 23% CopyIfChanged: 12% DirectoryAssemblyResolver.GetAssembly: 4.8% In an overall `.binlog` (without `dotnet-trace` attached): --LinkAssembliesNoShrink 3.797s ++LinkAssembliesNoShrink 3.105s This saved ~700ms on initial build of a new MAUI project.
We should look into further optimizing |
Android application type
.NET Android (net7.0-android, etc.)
Affected platform version
Android 33.0.46
Description
This is very very slow.
Steps to Reproduce
Build the app in unoplatform/Uno.Samples#584
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: