I've dozens of CTypes to add to an SPList programmatically (cause content types are provided by CTH) and each oSPList.ContentTypes.Add() takes almost 1sec. Is there any other approach ou code optimization for this 'issue'?

using List Definition is not the way to go, cause is required to add all the fields into the schema, and the idea is to get all of that info directly from the provided CT.


Of course, by Calling Synchronous Methods Asynchronously

  • do you mean that you introduced some parallelism in your code ? – Steve B Jul 10 '12 at 22:48
  • yes. I call the method for the CT adding, asynchronously, after the creation of the splist. – fallout Jul 11 '12 at 7:19

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.