I had the same problem and it turned out that in the deployed web application a lot of user-specific directories and files were accumulated in the user directory for downloads / report files, etc. Visual Studio checks and updates access control lists for each file and directory, and therefore it takes a lot of time if there are a lot of them.
Check directories with a huge amount of user content or other content with a large number of files and check if you can safely delete them (for example, if these files are created only temporarily - as it was in this case).
After cleaning the directory on the web server, the deployment is almost instantaneous for incremental updates, which were very slow before the cleanup process.
Ole Viaud-murat
source share