-
Notifications
You must be signed in to change notification settings - Fork 541
[XABT] Move scanning for ACW map JLOs to FindJavaObjectsStep
.
#9930
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I wondered about this step... If you are building a
Release
app with 4 RIDs, does this write a copy of the.xml
file 4 times? Is there logic that detects the first RID and skips the rest?The Java objects found are identical between all 4 RIDs. The only thing that would differ, is the BCL sets different trimmer flags based on 32 or 64-bit, different hardware intrinsics, etc.
System.Private.CoreLib.dll
and a few otherSystem
assemblies will differ per RID, but no Android-libraries or user-assemblies would.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will write the
.jlo.xml
4 times, one beside each "arch" of the assembly. Initially this was because this would eventually be a linker step, and the linker has no concept of deduplicating assembly sets that are running in parallel.If this is going to remain outside the linker, we might could avoid a few steps like this one and finding JLOs for generating java stub code in the future, however other steps we will migrate like marshal method rewriting and generating typemaps are "per-arch" and will still need to be run 4 times.
Note this duplication is simply for the JLO scanning, tasks such as
GenerateJavaCallableWrappers
andGenerateAcwMap
only read in the "first" arch to generate their output, as they are not "per-arch":android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaCallableWrappers.cs
Lines 47 to 50 in 9121bea
The good news is that the expensive part of the scan is the "first" scan, which has to deserialize the assemblies into Cecil structures. So adding additional scans on assemblies that have already been scanned for eg:
FixAbstractMethod
is actually pretty cheap (<100 ms).Today's
GenerateJavaStubs
also scans 4 times, so this isn't a performance regression. However, the new way will have the benefit of supporting incremental builds. It will not need to rescan every assembly if 1 changes.