-
Notifications
You must be signed in to change notification settings - Fork 524
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] use typemaps when EmbedAssembliesIntoApk=False #3692
Merged
jonathanpeppers
merged 1 commit into
dotnet:master
from
jonathanpeppers:typemap-embedassemblies
Oct 17, 2019
Merged
[Xamarin.Android.Build.Tasks] use typemaps when EmbedAssembliesIntoApk=False #3692
jonathanpeppers
merged 1 commit into
dotnet:master
from
jonathanpeppers:typemap-embedassemblies
Oct 17, 2019
Conversation
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
bd1a3c9
to
029d0c1
Compare
grendello
approved these changes
Sep 26, 2019
@jonathanpeppers out of curiosity, what was the crash you got that this PR fixes? |
@grendello oh the crash was when I was trying to get this to work, sorry. It was before I made the right |
029d0c1
to
fcab209
Compare
dellis1972
approved these changes
Oct 16, 2019
fcab209
to
a72a287
Compare
dellis1972
approved these changes
Oct 16, 2019
a72a287
to
6d72c93
Compare
…k=False Bumps to xamarin/monodroid@ab054acc Changes: xamarin/monodroid@6f77f15...ab054ac This is a first step to use the `typemap.mj` and `typemap.jm` files for Fast Deployment. We will eventually generate these files on a per-assembly basis, but can get some small perf improvements for `Debug` builds: * When `$(EmbedAssembliesIntoApk)` is `True` use the native assembly in `typemap.*.inc` and the current behavior. * When `$(EmbedAssembliesIntoApk)` is `False` don't generate any `typemap.*.inc` files at all, but still use the native assembly for environment variables. * We have to still generate `typemap.*.s` files with empty values. ~~ typemap.*.s changes ~~ Before: jm_typemap_header: /* version */ .long 1 /* entry-count */ .long 1324 /* entry-length */ .long 262 /* value-offset */ .long 117 .size jm_typemap_header, 16 /* Mapping data */ .type jm_typemap, %object .global jm_typemap jm_typemap: .size jm_typemap, 346889 .include "typemap.jm.inc" After: jm_typemap_header: /* version */ .long 1 /* entry-count */ .long 0 /* entry-length */ .long 0 /* value-offset */ .long 0 .size jm_typemap_header, 16 /* Mapping data */ .type jm_typemap, %object .global jm_typemap jm_typemap: .size jm_typemap, 0 The result is I don't get a crash at runtime and the `typemap.mj` and `typemap.jm` files are used. ~~ Results ~~ I timed the Xamarin.Forms integration project in this repo. An initial build: Before: 2860 ms GenerateJavaStubs 1 calls 84 ms CompileNativeAssembly 1 calls After: 2595 ms GenerateJavaStubs 1 calls 46 ms CompileNativeAssembly 1 calls On an incremental build where `MainActivity.cs` was changed: Before: 543 ms GenerateJavaStubs 1 calls After: 323 ms GenerateJavaStubs 1 calls `CompileNativeAssembly` is skipped for `MainActivity.cs` changes. When comparing startup performance: Before: ActivityTaskManager: Displayed Xamarin.Forms_Performance_Integration/xamarin.forms.performance.integration.MainActivity: +1s302ms After: ActivityTaskManager: Displayed Xamarin.Forms_Performance_Integration/xamarin.forms.performance.integration.MainActivity: +1s341ms As expected, startup is ~50ms worse. I would say this change saves ~250ms on the full dev-loop in cases where `<GenerateJavaStubs/>` needs to run.
6d72c93
to
2f4ab2b
Compare
The only two test failures are |
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.
This is a first step to use the
typemap.mj
andtypemap.jm
filesfor Fast Deployment. We will eventually generate these files on a
per-assembly basis, but can get some small perf improvements for
Debug
builds:$(EmbedAssembliesIntoApk)
isTrue
use the native assemblyin
typemap.*.inc
and the current behavior.$(EmbedAssembliesIntoApk)
isFalse
don't generate anytypemap.*.inc
files at all, but still use the native assembly forenvironment variables.
typemap.*.s
files with empty values.typemap.*.s changes
Before:
After:
The result is I don't get a crash at runtime and the
typemap.mj
andtypemap.jm
files are used.Results
I timed the Xamarin.Forms integration project in this repo.
An initial build:
On an incremental build where
MainActivity.cs
was changed:CompileNativeAssembly
is skipped forMainActivity.cs
changes.When comparing startup performance:
As expected, startup is ~50ms worse.
I would say this change saves ~250ms on the full dev-loop in cases
where
<GenerateJavaStubs/>
needs to run.