Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top