Use Remove-Item to replace DeleteFiles to speed up #19669
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DeleteFiles@1 takes long time in Nuget-CUDA-Packaging-Pipeline and encounter problem. This PR use Remove-Item to speed up.
Use DeleteFiles@1:
https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=415102&view=logs&j=7e009e83-d906-5d2f-987c-4cab9f4f25f8&t=a9a3231e-bcf1-5765-c413-edbd7c62c236
Use Remove-Item:
https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=415747&view=logs&j=92389838-2d01-5cb5-3e19-6f88093eb7cf&t=5153fb64-f58c-5e8d-5f6f-7a163bdcc405