SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Yesterday I have programmed to create folder in SharePoint 2010 using C#. It's fine that code create folder but the problem is that while creating a folder it takes 5-10 seconds. And i think it's too much. Because if i have thousands of folders to create then folder creation time would be significantly large. So how could i solve this issue?

share|improve this question
Could you post your code, so we can try to advice what to change? Also, instantiating an SPSite or SPWeb object, can take several seconds, indeed, but you need to do it only once, not for every folder you want to create. So creating 1000 folders could take less than creating 1 folder multiplied by 1000. – Norbert Aug 20 '13 at 6:58
First of all I would like to speak about the folder, the folder was created in the Document Library with a custom Content ype . The custom content has 2-3 lookup fields, and around 15-20 fields in total. Actually, in our architecture we have a command system to create a folder , means whenever a folder create option encounter then we create a command for that folder to create. Thereafter we pass that command to “WCF” where SPWeb object is initialized and disposed each time a command is received. So in this scenario how would I improve folder creation time. – Nabin Aug 20 '13 at 10:22
In this case, why are you worried about the time needed to create 1000 folders? If I understood you correctly, if somebody places a command for a folder a web service will eventually create it. If you worry about the scenario when 1000 simultaneous requests come in and then the WCF web service would have to create 1000 folders in the same time, then I would suggest to think about a queue mechanism at the web service level, which could reuse the same SPWeb object for the same site. – Norbert Aug 20 '13 at 12:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.