Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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)`.
- Loading branch information