-
Notifications
You must be signed in to change notification settings - Fork 564
[Mono.Android] Implement JniValueManager.ActivatePeer #5530
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
Conversation
|
Err |
|
The |
That means the |
Context: #5444 This allows us to remove SLE dependency and save cca 15% of assembly size. Size difference of BuildReleaseArm64False on net6: Size difference in bytes ([*1] apk1 only, [*2] apk2 only): + 96 assemblies/Mono.Android.dll - 331 assemblies/System.Collections.Concurrent.dll - 907 assemblies/Java.Interop.dll - 1,003 assemblies/System.Linq.dll - 3,856 assemblies/System.ObjectModel.dll *1 - 4,496 assemblies/System.Collections.dll *1 - 7,824 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 133,605 Assemblies -15.33% (of 871,776)
93a4e60 to
e2ded49
Compare
|
Squash-and-merge… Summary: Body: Fixes: https://github.com/xamarin/xamarin-android/issues/5400
Changes: https://github.com/xamarin/Java.Interop/compare/a8f68e562827e9ae6b2e12edf7445b1a3112d6fd...cba613703e100e99ba005344da60d51448ecaf2a
* xamarin/Java.Interop@cba61370: [Java.Interop] Add JniRuntime.JniValueManager.ActivatePeer() (#784)
* xamarin/Java.Interop@8c7194fd: [AzDO] Switch default branch from master to main. (#786)
* xamarin/Java.Interop@b0d170c1: [generator] Only apply ConstSugar to Mono.Android.dll (#780)
xamarin/Java.Interop@cba61370 removed the the previously required use
of System.Linq.Expressions from the internal `ManagedPeer` class,
replacing with a call to `JniRuntime.JniValueManager.ActivatePeer()`.
Override `JniRuntime.JniValueManager.ActivatePeer()` within
`Android.Runtime.AndroidRuntime`, implementing
`AndroidRuntime.ActivatePeer()` in terms of
`Java.Interop.TypeManager.Activate()`, thus avoiding the need for
System.Linq.Expressions.
This saves us ~15% in assembly size; size difference of
BuildReleaseArm64False on net6:
Size difference in bytes ([*1] apk1 only, [*2] apk2 only):
+ 96 assemblies/Mono.Android.dll
- 331 assemblies/System.Collections.Concurrent.dll
- 907 assemblies/Java.Interop.dll
- 1,003 assemblies/System.Linq.dll
- 3,856 assemblies/System.ObjectModel.dll *1
- 4,496 assemblies/System.Collections.dll *1
- 7,824 assemblies/System.Private.CoreLib.dll
- 115,284 assemblies/System.Linq.Expressions.dll *1
Summary:
- 133,605 Assemblies -15.33% (of 871,776) |
Implement
JniValueManager.ActivatePeermethodin
AndroidValueManager.Context: #5400
This allows us to remove SLE dependency and save cca 15% of assembly
size for XA simple Hello world app.
Size difference of
BuildReleaseArm64Falseon net6: