i wrote a power shell script to deploy my wsp to to SP 2010 server. It first checks if the solutions is already there and deployed if yes then retracts and redeploy again. It deploys to a specific web application only. The issue is "Retraction" and re -deployment are taking ages to complete. Though from VS2010 there is no issue and it deploys in no time. I am working with a very basic wsp (just one web part only and another feature receiver that does nothing at all). So I am not sure why its taking so much time. Please suggest.
When you deploy/retract your solutions using PowerShell/stsadm it creates a timer job. That timer job operation is invoked by the sptimerv4/owstimer.exe process in the background and starts every 60 seconds. Sometimes there are other timer jobs in the queue which makes it take longer times. If you're only doing it on a single machine (dev box) you can add the
-Local parameter to the cmdlet, this invokes the job directly.