-
Notifications
You must be signed in to change notification settings - Fork 533
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
[Aapt2] _CreateAapt2VersionCache
slow due to wildcard usage
#2121
Comments
We should only run the entire target if We need the wildcards since we will need to recurse into subfolders like the
|
…wildcard usage Fixes dotnet#2121 There were a number of performace issues with `_CreateAapt2VersionCache`. First the wildcards were processing the ENTIRE `$(IntermediateOutputPath)`! What they should have been doing was targeting specific directories. I.e the root of `$(IntermediateOutputPath)` and the directories under `$(IntermediateOutputPath)\lp`. The target did not have a Condition to stop it running if the versions matched, so that has been added. However, even if a target is NOT run. MSbuild will still evaluate the `PropertyGroups` and `ItemGroups` within the targets. So we need to add `Conditon` on the `_CompiledFlataArchive` and `_CompiledFlataStamp` items as well. With these in place the time when this target is skipped is down to 1ms.
…wildcard usage Fixes dotnet#2121 There were a number of performace issues with `_CreateAapt2VersionCache`. First the wildcards were processing the ENTIRE `$(IntermediateOutputPath)`! What they should have been doing was targeting specific directories. I.e the root of `$(IntermediateOutputPath)` and the directories under `$(IntermediateOutputPath)\lp`. The target did not have a Condition to stop it running if the versions matched, so that has been added. However, even if a target is NOT run. MSbuild will still evaluate the `PropertyGroups` and `ItemGroups` within the targets. So we need to add `Conditon` on the `_CompiledFlataArchive` and `_CompiledFlataStamp` items as well. With these in place the time when this target is skipped is down to 1ms.
…wildcard usage Fixes dotnet#2121 There were a number of performace issues with `_CreateAapt2VersionCache`. First the wildcards were processing the ENTIRE `$(IntermediateOutputPath)`! What they should have been doing was targeting specific directories. I.e the root of `$(IntermediateOutputPath)` and the directories under `$(IntermediateOutputPath)\lp`. The target did not have a Condition to stop it running if the versions matched, so that has been added. However, even if a target is NOT run. MSbuild will still evaluate the `PropertyGroups` and `ItemGroups` within the targets. So we need to add `Conditon` on the `_CompiledFlataArchive` and `_CompiledFlataStamp` items as well. With these in place the time when this target is skipped is down to 1ms.
…wildcard usage (#2124) Fixes: #2121 There were a number of performance issues with the `_CreateAapt2VersionCache` target. Firstly the wildcards were processing the *entire* `$(IntermediateOutputPath)` tree! What they should have been doing was targeting specific directories, e.g. the root of `$(IntermediateOutputPath)` and the directories under `$(IntermediateOutputPath)\lp`. Secondly the target did not have a `Condition` to stop it from running if the versions matched, so that has been added. Thirdly, even if a target is NOT run, MSBuild will still evaluate the `<PropertyGroup/>`s and `<ItemGroup/>`s within the Target, so we need to add a `Conditon` on the `@(_CompiledFlataArchive)` and `@(_CompiledFlataStamp)` items as well to prevent evaluation and corresponding directory traversal. With these in place the time when this target is reduced to 1ms.
Steps to Reproduce
tests/Xamarin.Forms-Performance-Integration
app_CreateAapt2VersionCache
took 181ms, but the values were cached!I think the problem is due to wildcard usage:
Maybe these could be done without using
**
? we have a lot of files in here.Expected Behavior
_CreateAapt2VersionCache
should take near 1ms when things are cached.Actual Behavior
_CreateAapt2VersionCache
is taking ~181ms even when cached.Version Information
Was using master as of: 0a46788
Log File
msbuild.zip
The text was updated successfully, but these errors were encountered: