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

_CreateAapt2VersionCache target always runs on master #1748

Closed
jonathanpeppers opened this issue May 30, 2018 · 1 comment · Fixed by #1753
Closed

_CreateAapt2VersionCache target always runs on master #1748

jonathanpeppers opened this issue May 30, 2018 · 1 comment · Fixed by #1753
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects. vs-sync For internal use only; creates a VSTS "mirror" issue.
Milestone

Comments

@jonathanpeppers
Copy link
Member

jonathanpeppers commented May 30, 2018

Steps to Reproduce

  1. Build Xamarin.Forms.ControlGallery.Android.csproj
  2. Build it again, with no changes

The _CreateAapt2VersionCache target is always running, and it seems to be a bit of a performance regression.

For example, in the log from building this project I see the following times from this project and other referenced projects:

  • 144ms
  • 51ms
  • 92ms
  • 127ms
  • 102ms

Total of 516ms added to a build with no changes.

Expected Behavior

_CreateAapt2VersionCache runs even though Aapt2 is disabled by default via $(AndroidUseAapt2) set to False

Actual Behavior

_CreateAapt2VersionCache always runs.

Version Information

My local build is at commit: d8fdbcf

VS bug #624025

@jonathanpeppers jonathanpeppers added the Area: App+Library Build Issues when building Library projects or Application projects. label May 30, 2018
@jonathanpeppers jonathanpeppers added this to the d15-8 milestone May 30, 2018
@jonathanpeppers jonathanpeppers self-assigned this May 30, 2018
@jonathanpeppers
Copy link
Member Author

I'll look into this tomorrow, since we are branching soon.

@jonathanpeppers jonathanpeppers added the vs-sync For internal use only; creates a VSTS "mirror" issue. label May 30, 2018
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this issue May 30, 2018
…disabled

Fixes: xamarin#1748

I was testing build times on master with a project in the
Xamarin.Forms repo.

I discovered the following scenario:
1. Build [Xamarin.Forms.ControlGallery.Android.csproj](https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj)
2. Build it again, with no changes

The `_CreateAapt2VersionCache` target was always running, and it seems
to be a bit of a performance regression.

For example, in the log from building this project I saw the following
times from this project and other referenced projects:
- 144ms
- 51ms
- 92ms
- 127ms
- 102ms

Total of 516ms added to a build with no changes.

To fix this I:
- Added a test with `$(AndroidUseAapt2)` set to `False`, verifying
  `Aapt2Link` and `_CreateAapt2VersionCache` are skipped.
- Added a `Condition` so that `_CreateAapt2VersionCache` doesn't run
  if aapt2 is disabled
jonpryor pushed a commit that referenced this issue May 31, 2018
Fixes: #1748

I was testing build times on master with a project in the
Xamarin.Forms repo.

I discovered the following scenario:

 1. Build [Xamarin.Forms.ControlGallery.Android.csproj][1]
 2. Build it again, with no changes

[1]: https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj

The `_CreateAapt2VersionCache` target was always running, and it
seems to be a bit of a performance regression.

For example, in the log from building this project I saw the following
times from this project and other referenced projects:

  - 144ms
  - 51ms
  - 92ms
  - 127ms
  - 102ms

Total of 516ms added to a build with no changes.

To fix this:

  - Added a test with `$(AndroidUseAapt2)`=False, verifying that the
    `<Aapt2Link/>` task and `_CreateAapt2VersionCache` target is skipped.
  - Added a `Condition` so that `_CreateAapt2VersionCache` doesn't
    run if `aapt2` is disabled
@xamarin xamarin locked as resolved and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects. vs-sync For internal use only; creates a VSTS "mirror" issue.
Projects
None yet
1 participant