-
Notifications
You must be signed in to change notification settings - Fork 526
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
[monodroid] don't probe for .exe files #3958
Merged
Merged
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
I was noticing a lot of logging like this: 11-25 13:14:59.430 13111 13111 I monodroid-assembly: open_from_update_dir: trying to open assembly: /data/user/0/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll 11-25 13:14:59.431 13111 13111 I monodroid-assembly: open_from_update_dir: trying to open assembly: /storage/emulated/0/Android/data/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll 11-25 13:14:59.431 13111 13111 I monodroid-assembly: open_from_update_dir: trying to open assembly: /data/user/0/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll.dll 11-25 13:14:59.431 13111 13111 I monodroid-assembly: open_from_update_dir: trying to open assembly: /storage/emulated/0/Android/data/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll.dll 11-25 13:14:59.431 13111 13111 I monodroid-assembly: open_from_update_dir: trying to open assembly: /data/user/0/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll.exe 11-25 13:14:59.431 13111 13111 I monodroid-assembly: open_from_update_dir: trying to open assembly: /storage/emulated/0/Android/data/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll.exe 11-25 13:14:59.431 13111 13111 I monodroid-assembly: open_from_bundles: looking for bundled name: 'mscorlib.dll' 11-25 13:14:59.431 13111 13111 D Mono : Image addref mscorlib[0x7f74876f3f00] (asmctx DEFAULT) -> mscorlib.dll[0x7f747fb32000]: 2 A couple things we could do here is: 1. Don't probe for `.exe` files at all. We don't even consider `.exe` files at build time anymore since e390702. 2. Check if the name ends with `.dll` to decide if `.dll` should be appended when probing. This change is needed in both `open_from_update_dir` and `open_from_bundles`. Now the probing is cut down to: 11-25 13:24:42.060 16492 16492 I monodroid-assembly: open_from_update_dir: trying to open assembly: /data/user/0/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll 11-25 13:24:42.060 16492 16492 I monodroid-assembly: open_from_update_dir: trying to open assembly: /storage/emulated/0/Android/data/com.xamarin.android.helloworld/files/.__override__/mscorlib.dll 11-25 13:24:42.060 16492 16492 I monodroid-assembly: open_from_bundles: looking for bundled name: 'mscorlib.dll' 11-25 13:24:42.063 16492 16492 D Mono : Image addref mscorlib[0x7f74876f2f80] (asmctx DEFAULT) -> mscorlib.dll[0x7f747fb33000]: 2 ~~ Results ~~ Using the `samples\HelloWorld` app in this repo, on a Pixel 3 XL: Before: 11-25 12:00:42.863 31251 31251 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:165::704288 11-25 12:00:44.997 31306 31306 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:165::558089 11-25 12:00:47.137 31359 31359 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:165::936683 11-25 12:00:49.201 31412 31412 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:164::536735 11-25 12:00:51.330 31464 31464 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:166::357204 After: 11-25 12:08:34.160 32331 32331 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:165::597673 11-25 12:08:37.022 32384 32384 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:164::106162 11-25 12:08:39.237 32439 32439 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:164::997516 11-25 12:08:41.841 32490 32490 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:164::931683 11-25 12:08:44.731 32551 32551 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:164::95381 My guess is this is a 1-2ms improvement on this device. So then I tried an x86 emulator using HAXM: Before: 11-25 13:19:06.679 14703 14703 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:501::511300 11-25 13:19:09.191 14753 14753 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:545::571100 11-25 13:19:11.902 14827 14827 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:555::89900 11-25 13:19:15.503 14880 14880 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:541::920000 11-25 13:19:18.377 14981 14981 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:509::316700 After: 11-25 13:27:24.287 17169 17169 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:472::543900 11-25 13:27:26.777 17216 17216 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:446::208700 11-25 13:27:29.369 17265 17265 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:469::216400 11-25 13:27:31.977 17313 17313 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:420::160500 11-25 13:27:34.700 17357 17357 I monodroid-timing: Runtime.init: end, total time; elapsed: 0s:437::225200 Here the improvement might be more like 50-75ms. I will probably focus on timing the HAXM emulator from now on, since I am focusing on improving the developer loop here.
grendello
reviewed
Nov 25, 2019
grendello
approved these changes
Nov 25, 2019
dellis1972
approved these changes
Nov 26, 2019
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Nov 26, 2019
Missing docs for: dotnet#3958
jonpryor
pushed a commit
that referenced
this pull request
Nov 27, 2019
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.
I was noticing a lot of logging like this:
A couple things we could do here is:
.exe
files at all. We don't even consider.exe
files at build time anymore since e390702.
.dll
to decide if.dll
should beappended when probing.
This change is needed in both
open_from_update_dir
andopen_from_bundles
.Now the probing is cut down to:
Results
Using the
samples\HelloWorld
app in this repo, on a Pixel 3 XL:My guess is this is a 1-2ms improvement on this device.
So then I tried an x86 emulator using HAXM:
Here the improvement might be more like 50-75ms. I will probably focus
on timing the HAXM emulator from now on, since I am focusing on
improving the developer loop here.