You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[XABT] Make assembly compression incremental. (#9704)
If using `$(AndroidEnableAssemblyCompression)` today, we do not compress assemblies incrementally. That is, we always compress every assembly even if they haven't changed since the previous build.
Update the `CompressAssemblies` task to check if the input is newer than the output, and skip recompressing if the input has not changed.
This is most visible with the following test case:
```
dotnet new android
dotnet build -p:EmbedAssembliesIntoApk=true -p:AndroidIncludeDebugSymbols=false
```
| Scenario (`CompressAssemblies` tasks) | main | This PR |
| --------------- | -------- | -------- |
| Full | 44.26 s | 44.2 s |
| NoChanges | not run | 34 ms |
| ChangeResource | 27.8 s | 9 ms |
| AddResource | 25.81 s | 25 ms |
| ChangeCSharp | 25.87 s | 30 ms |
| ChangeCSharpJLO | 27.04 s | 23.36 s |
`ChangeCSharpJLO` should be similarly reduced, however something earlier in the build process is causing `Mono.Android.dll` to get touched so it is getting recompressed. We'll leave that as an investigation for another day.
0 commit comments