-
Notifications
You must be signed in to change notification settings - Fork 516
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
[.NET] Build time is slower #10251
Comments
CC @marek-safar |
P2 numbers. They look closer, between them [1], than the original numbers. [1] this was done on a different (and slower) computer than the original post.
|
The difference in |
@filipnavara I missed it (looked only at how note: It seems there was already a large diff in [1] some Apple tools (like ibtool) spawn daemons that stays alive (for a while) so running two builds sequentially can skew numbers. |
The majority of time in Presumably this is something that should not be done on every compilation or could be avoided. I cannot see the same thing happening in the old Mono build unless it's folded quietly into one of the other tasks. Moreover, the NuGet package |
@filipnavara that make sense 😄 The In all honesty taking the times from a release build (like we did here) is not really correct. It was just easier as the data was already on hands (from the size tracking issue). IOW
But right now comparing release build times from current/legacy and dotnet gives us a feeling if we trend in the right (or wrong) direction. We'll eventually do more accurate measurements once all the pieces have landed. OTOH don't let me stop you from doing your own measurements/experiments 😃 |
Ah, good point. Coming from macOS background I missed that, especially since there was an explicit condition for iOS dylibs: xamarin-macios/msbuild/Xamarin.Shared/Xamarin.Shared.targets Lines 1017 to 1022 in 3a96cb0
So the issue is that more things get included that should not be present in the bundle, right?
Well, I compared the binlogs you used. Then again, on iOS the code signing is unconditionally enabled even on Debug builds: xamarin-macios/msbuild/Xamarin.Shared/Xamarin.Shared.targets Lines 1000 to 1004 in 3a96cb0
|
Yes,
Yes. They are not needed... or if they somehow are it's a bug that needs to be fixed.
Yes. Devices won't accept unsigned (native) code. Simulator behave differently wrt signatures (it's not always needed). |
I checked the latest package from |
legacy |
This is an example of where our build is pretty slow: #11886 |
See also: dotnet/linker#2089 |
legacy [1] configured to use LLVM, like legacy but unlike previous numbers for dotnet |
Legacytime
net6 rc.1time
since it's close to the smallest app possible this kind of show the minimal build times. note: this can be duplicated by applying https://gist.github.com/spouliot/2ade2822865fa7dff6cad0f11bbb2b09 to |
I did some testing on release/6.0.1xx-preview9 to get speed info. It was done on an older mac pro (trashcan), so they are comparable only to each other, not older builds. These are release device builds: These are debug sim builds: |
These are on a newer machine than last time, so they are comparable only to each other, not older builds. Release DeviceLegacy - real 0m24.838s user 0m23.670s sys 0m3.584s Debug SimLegacy - real 0m5.205s user 0m3.823s sys 0m1.142s |
Report on 4564969 from https://github.com/xamarin/xamarin-macios/commits/release/6.0.1xx-preview11: Release DeviceLegacy - real 0m30.268s user 0m24.250s sys 0m3.900s Debug SimLegacy - real 0m5.227s user 0m3.829s sys 0m1.123s |
…don't link' scenario. (#14011) This speeds up builds significantly when the linker is disabled. Test case: building tests/dotnet/MySimpleApp for macOS. * Before: 37s * After: 9s * Difference: 26s (4x faster) Test case: run the .NET tests * Before: 2h55 * After: 1h43 * Difference: 1h12 (1.7x faster) Contributes towards #10251. Ref: dotnet/linker#2089
There is still work to do here, but it's too late in the .NET 6 timeframe, so I'm postponing until .NET 7. |
Build time is significantly slower with .NET 6 than with Xamarin.iOS.
cd tests/dotnet git clean -xfdq make compare
Then check the bin logs in the tests/dotnet directory.
Xamarin.iOS takes 11s to build:
.NET 6 takes 18s to build:
The ILLink task significantly longer than the MTouch task used to take (which also includes AOT compilation and native code compilation).
The text was updated successfully, but these errors were encountered: