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] simplify inputs to _CompileToDalvik (#2131
) Recently I've been discovering more and more places where usage of `**\*.*` can hurt the performance of our build. In this case, the `_FindCompiledJavaFiles` target: <Target Name="_FindCompiledJavaFiles" DependsOnTargets="_CompileJava"> <CreateItem Include="$(IntermediateOutputPath)android\bin\classes\\**\*.class"> <Output TaskParameter="Include" ItemName="_CompiledJavaFiles" /> </CreateItem> </Target> This target is running even in builds with no changes, so we are *always* recursing directories and finding `*.class` files. But since we are using a `classes.zip` file now, we don't need to recurse and find the `*.class` files at all anymore! I was able to remove this target completely, and change `$(_CompileToDalvikInputs)` to use `$(IntermediateOutputPath)android\bin\classes.zip`. Less inputs also help build times, because MSBuild won't have to evaluate timestamps on all the `*.class` files. It can just look at the single `classes.zip` file. To see the difference, a build with no changes was taking: 46 ms _FindCompiledJavaFiles 1 calls 15 ms _CompileToDalvikWithDx 1 calls After these changes: 4 ms _CompileToDalvikWithDx 1 calls `_FindCompiledJavaFiles` is gone completely. I also made sure to include `_CompileJava` in `$(_CompileToDalvikDependsOnTargets)` in place of `_FindCompiledJavaFiles`.
- Loading branch information