Commit ac16d2c
[Xamarin.Android.Build.Tasks] leave classes.zip uncompressed (#2140)
I was thinking about a couple of the slower MSBuild tasks:
- `Javac`
- `CompileToDalvik`
One thing I noticed here was that `Javac` outputs a `classes.zip`
file, and `CompileToDalvik` consumes it. It also looked like we are
using `CompressionMethod.Default` as you would expect.
So why should we compress this file at all? It seemed that was work we
could just skip and things would work fine? Presumably `dx.jar` can
work with an uncompressed `classes.zip` file faster than a compressed
one?
So I made the following changes:
- Added an option to pass in the `CompressionMethod` in `ZipArchiveEx`
- Used `CompressionMethod.Store` for creating `classes.zip`
The results on a File | New Xamarin.Forms app looked great!
Before:
3443 ms Javac 1 calls
11545 ms CompileToDalvik 1 calls
After:
3338 ms Javac 1 calls
10535 ms CompileToDalvik 1 calls
I did a `Clean` before running the `SignAndroidPackage` target on
these builds.
These savings seem pretty good! The only drawback being we use more
disk space in `$(IntermediateOutputPath)`.1 parent d8e9a30 commit ac16d2c
File tree
2 files changed
+8
-7
lines changed- src/Xamarin.Android.Build.Tasks
- Tasks
- Utilities
2 files changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
0 commit comments