-
Notifications
You must be signed in to change notification settings - Fork 63
Conditionally call ManagedPeer.Init() #761
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
jonpryor
merged 6 commits into
dotnet:master
from
radekdoulik:pr-conditional-managed-peer-init
Jan 11, 2021
Merged
Conditionally call ManagedPeer.Init() #761
jonpryor
merged 6 commits into
dotnet:master
from
radekdoulik:pr-conditional-managed-peer-init
Jan 11, 2021
Conversation
This file contains hidden or 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
Driven by `XA_JI_EXCLUDE`, which will be defined in Xamarin.Android.props, when building for XA.
They are not used anymore
Contributor
|
Who is setting |
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Dec 18, 2020
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
Member
Author
I updated the PR description with that information. |
jonpryor
reviewed
Jan 7, 2021
jonpryor
reviewed
Jan 7, 2021
...to a place whete `$(Configuration) is already set
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Jan 12, 2021
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Jan 12, 2021
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Jan 15, 2021
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Context: dotnet/android#5400
Context: dotnet/android#5444
Driven by
XA_JI_EXCLUDE, which will be definedin
XAConfig.propsin$(JavaInteropDefineConstants), whenbuilding for XA. The file is generated by XA's
xaprepin
bin/Build$(Configuration).Also clean old
XA_INTEGRATION#if's, they are not used anymore.