Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Of course, by Calling Synchronous Methods Asynchronously

share|improve this answer
    
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
add comment

Your Answer

 
discard

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

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