Skip to content

Commit 735377e

Browse files
Revert "[Xamarin.Android.Build.Tasks] more fixes for parallel builds (#2063)" (#2098)
This *partially* reverts commit 73f7f47. We want the change to the test, because it was failing on MacOS. However, I noticed a performance regression in `ResolveLibraryProjectImports`. It went from ~1 sec to ~3 sec for me. Since we shouldn't make our build times *worse*, let's revert this change for now. It only *helped* parallel builds on Mac, but did not fully fix them.
1 parent d8f4335 commit 735377e

File tree

1 file changed

+1
-7
lines changed
  • src/Xamarin.Android.Build.Tasks/Utilities

1 file changed

+1
-7
lines changed

src/Xamarin.Android.Build.Tasks/Utilities/Files.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,16 +243,10 @@ public static bool ExtractAll(ZipArchive zip, string destination, Action<int, in
243243
files.Add (outfile);
244244
var dt = File.Exists (outfile) ? File.GetLastWriteTimeUtc (outfile) : DateTime.MinValue;
245245
if (forceUpdate || entry.ModificationTime > dt) {
246-
var temp = Path.GetTempFileName ();
247246
try {
248-
using (var stream = File.Create (temp)) {
249-
entry.Extract (stream);
250-
}
251-
MonoAndroidHelper.CopyIfChanged (temp, outfile);
247+
entry.Extract (destination, fullName, FileMode.Create);
252248
} catch (PathTooLongException) {
253249
throw new PathTooLongException ($"Could not extract \"{fullName}\" to \"{outfile}\". Path is too long.");
254-
} finally {
255-
File.Delete (temp);
256250
}
257251
updated = true;
258252
}

0 commit comments

Comments
 (0)