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

[Xamarin.Android.Build.Tasks] remove HasClassFiles checks #9293

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

jonathanpeppers
Copy link
Member

Context: #2882

During an incremental build + deploy of a dotnet new maui project, I noticed time spent in:

62.52ms (1.8%) xamarin.android.build.tasks!Xamarin.Android.Tasks.DetermineJavaLibrariesToCompile.HasClassFiles(class System.String)

What's worse, is this happens once for build and again for deploy. Because there are 100+ .jar files, we are actively opening each one with libZipSharp to determine if there are any .class files.

In e6326dc, we added the HasClassFiles() call to fix a problem with "Enhanced Fast Deployment". However, we have since completely removed this feature in:

Removing the HasClassFiles() method completely, should improve the inner loop by around 120ms for dotnet new maui projects.

Context: dotnet#2882

During an incremental build + deploy of a `dotnet new maui`
project, I noticed time spent in:

    62.52ms (1.8%) xamarin.android.build.tasks!Xamarin.Android.Tasks.DetermineJavaLibrariesToCompile.HasClassFiles(class System.String)

What's worse, is this happens once for build and again for deploy.
Because there are 100+ `.jar` files, we are actively opening each one
with libZipSharp to determine if there are any `.class` files.

In e6326dc, we added the `HasClassFiles()` call to fix a problem with
"Enhanced Fast Deployment". However, we have since completely removed
this feature in:

* xamarin/monodroid@93ab95e
* xamarin/monodroid@2c64cd5

Removing the `HasClassFiles()` method completely, should improve the
inner loop by around 120ms for `dotnet new maui` projects.
@jonathanpeppers jonathanpeppers marked this pull request as ready for review September 10, 2024 20:03
@dellis1972 dellis1972 merged commit 645c02e into dotnet:main Sep 11, 2024
57 checks passed
@jonathanpeppers jonathanpeppers deleted the JarHasClassFiles branch September 11, 2024 10:28
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants