Uploading files to SharePoint (2013) slow with SPFileCollection.Add() method
files coming file share on hitachi storage (all 15k sas). no issues getting file using readallbytes() method byte array , convert stream object. overall server resources good; no memory or cpu spikes , network latency <1ms. however, did notice 200ms roundtrip latency on 1 of sharepoint worker processes.
passing file name , stream object parameters spfilecollection.add() method. pretty standard stuff.
the method taking 2-3 minutes execute. target folder is 4 levels deep , has 20k+ items in already, finished uploading files library 2.8 million documents in , uploading metadata @ 3-4 seconds per document.
i realize may not powershell issue @ all, wanted post here first see if has encountered before.
this how upload large libraries. fast:
after attach library can use powershell "copy-item" command copy files , folders. attributes automatically mapped.
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment