1

I have an Hyper-V machine running Sharepoint 2013 connected to an hosted server with 16GB ram, where the database is installed for that Sharepoint server.

I wanted to improve the local deployment process for a sharepoint WebSite, but I want to know the criteria that defines the speed of the process - Currently, executing this code here, the deploy takes over 30 minutes or so:

Write-Host "Disabling features..."
Disable-SPFeature -identity "MyCompany.ProjectName.SP_WebParts" -URL $webapp -confirm:$false
Disable-SPFeature -identity "MyCompany.ProjectName.SP_Modules" -URL $webapp -confirm:$false
#Disable-SPFeature -identity "MyCompany.ProjectName.SP_Listas" -URL $webapp -confirm:$false
wait4timer($wsp)
Write-Host "Removing Solution..."
uninstall-spsolution $wsp -WebApplication $webapp -confirm:$false
wait4timer($wsp)
remove-spsolution $wsp -Confirm:$false
wait4timer($wsp)
Write-Host "Installing Solution..."
add-spsolution -literalpath "$path\$wsp"
wait4timer($wsp)
install-spsolution -Identity $wsp -WebApplication $webapp -gacdeployment -force -FullTrustBinDeployment
wait4timer($wsp)

write-host "Enabling features..."

write-host "MyCompany.ProjectName.SP_WebParts..."
Enable-SPFeature -identity "MyCompany.ProjectName.SP_WebParts" -URL $webapp -confirm:$false 
wait4timer($wsp)
write-host "MyCompany.ProjectName.SP_Modules..."
Enable-SPFeature -identity "MyCompany.ProjectName.SP_Modules" -URL $webapp -confirm:$false 
wait4timer($wsp)
#write-host "MyCompany.ProjectName.SP_Listas..."
#Enable-SPFeature -identity "MyCompany.ProjectName.SP_Listas" -URL $webapp -confirm:$false 
wait4timer($wsp)

Here's the timer function:

function wait4timer($webapp) {
    $solution = Get-SPSolution | where-object {$_.Name -eq $wsp}
    if ($solution -ne $null) 
    {
        $counter = 1   

        Write-Host "Waiting to finish solution timer job"
        while( ($solution.JobExists -eq $true ) -and ( $counter -lt 500 ) ) 
        {   
            #Write-Host "Please wait... $counter"
            sleep 1
            $counter++   
        }

        Write-Host "Finished the solution timer job. Duration: $counter s"
    }
} #end wait4timer

So, I don't think there is a problem with that code, but in any case. It is posted above.

More details about the WSP package:

  • It weights around 55MB;
  • It has over 100 visual webparts and more than 1000 image, javascript and css files.

We want to know what could we do to help speed perfomance for that deployment process:

  • Increase the local Machine RAM?
  • Increase database RAM?
  • Improve some hardware on the local machine?
  • Some configuration on the local Machine?
  • A change in the deployment script?

Or any other information on the subject.

TL;DR: What defines Sharepoint deployment speed, and how can I improve it?

  • what is your wait4timer() function doing? – Eric Alexander Dec 21 '15 at 14:51
  • @EricAlexander It just waits for the timer job. I'll add it to the question. – Malavos Dec 21 '15 at 14:56
  • do you have configured search service? what are the crawling settings? – love thakker Dec 21 '15 at 15:17
  • 2
    1000 images.. what are the combined size of them? You have to remember that a wsp is a compressed cab file. Deploying a solution, Sharepoint needs to extract all files. – Christoffer Dec 21 '15 at 15:29
2

I don't know your fully requirements but its not good practice to install your wsp package every time. you can use Update-SPSolution command to upgrade your wsp package. Once your package is upgraded call feature deactivate/activate call. This will improve your time performance. For more information read this MSDN link.

Also you said you have 1000 images. Please add property "IgnoreIfAlreadyExists". So they will not add if they are already exist.

  • It's not always, we use a lot CKSDEV as well. But we want to improve the perfomance when we do so - when the client update any of these files (they are the ones who controls most of these images and JS files, and they push these changes at once), we have to overwrite all of them. That's when we need to update these packages, and that's why I want to improve the perfomance on these situations. – Malavos Dec 21 '15 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.