Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows build perf] UnpackLibraryResources should consume .NET assemblies from the Mac installation #19511

Closed
Tracked by #19611
emaf opened this issue Nov 22, 2023 · 1 comment · Fixed by #21305
Closed
Tracked by #19611
Assignees
Labels
delighter-sc msbuild Issues affecting our msbuild tasks/targets performance If an issue or pull request is related to performance windows-only The issue only occur on Windows
Milestone

Comments

@emaf
Copy link
Contributor

emaf commented Nov 22, 2023

When building an iOS project remotely from Windows, the UnpackLibraryResources taks is comparing/copying ~ 150 .NET assemblies over to the Mac that already exist in the SDK installation. The task seems to have enough information to avoid copying those and take them from the installation directory on the Mac.

This also impacts incremental builds because even though we cache files on the Mac, comparing 150 files takes a considerable amount of time.

image

Expected Behavior

Files that are part of the SDK installed on the Mac should be consumed from there

Actual Behavior

We are copying unnecesary files over the network

Build Logs

Note: this logs were taken when building from a Dev Box
Binlogs.zip

@rolfbjarne
Copy link
Member

We might be able to execute this task fully on Windows, as far as I can tell there's nothing that needs to happen on a Mac.

@rolfbjarne rolfbjarne added this to the .NET 9 milestone Nov 27, 2023
@rolfbjarne rolfbjarne added the msbuild Issues affecting our msbuild tasks/targets label Nov 27, 2023
@github-project-automation github-project-automation bot moved this to Optimizations in .NET 9 Aug 27, 2024
rolfbjarne added a commit that referenced this issue Sep 25, 2024
…assemblies. Fixes #19511.

We know BCL won't have library resources to unpack, so there's no need to
spend any time looking at them.

This also required porting the UnpackLibraryResources task to use
System.Reflection.Metadata, because MetadataLoadContext requires the reference
assemblies to be available to resolve assembly dependencies (and the idea is
to not have to pass any reference assemblies to the task).

Fixes #19511.
@rolfbjarne rolfbjarne modified the milestones: .NET 9, .NET 10 Sep 26, 2024
@rolfbjarne rolfbjarne removed this from .NET 9 Sep 26, 2024
@rolfbjarne rolfbjarne self-assigned this Sep 26, 2024
rolfbjarne added a commit that referenced this issue Oct 2, 2024
…assemblies. Fixes #19511. (#21305)

We know BCL won't have library resources to unpack, so there's no need to
spend any time looking at them.

This also required porting the UnpackLibraryResources task to use
System.Reflection.Metadata, because MetadataLoadContext requires the reference
assemblies to be available to resolve assembly dependencies (and the idea is
to not have to pass any reference assemblies to the task).

Fixes #19511.
Fixes #15030.
rolfbjarne added a commit that referenced this issue Oct 22, 2024
…assemblies. Fixes #19511. (#21305)

We know BCL won't have library resources to unpack, so there's no need to
spend any time looking at them.

This also required porting the UnpackLibraryResources task to use
System.Reflection.Metadata, because MetadataLoadContext requires the reference
assemblies to be available to resolve assembly dependencies (and the idea is
to not have to pass any reference assemblies to the task).

Fixes #19511.
Fixes #15030.
rolfbjarne added a commit that referenced this issue Oct 28, 2024
…assemblies. Fixes #19511. (#21305)

We know BCL won't have library resources to unpack, so there's no need to
spend any time looking at them.

This also required porting the UnpackLibraryResources task to use
System.Reflection.Metadata, because MetadataLoadContext requires the reference
assemblies to be available to resolve assembly dependencies (and the idea is
to not have to pass any reference assemblies to the task).

Fixes #19511.
Fixes #15030.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delighter-sc msbuild Issues affecting our msbuild tasks/targets performance If an issue or pull request is related to performance windows-only The issue only occur on Windows
Projects
None yet
3 participants