1

Context : SharePoint Online.

Scenario : We have more than 3000 sub-sites in site collection. Currently we have developed one web-part which contains one text-box. In which whenever user will start typing Autocomplete will show title of all matching sub-sites.

What we did is : On page load, we are looping through all sub-sites, retrieving title then storing it in array and finally binding this array to Jquery UI Autocomplete. Our web-part is working fine.

Problem : Since there are 3000 sub-sites, It taking almost 30 seconds on page load to bind all sub-site's titles. So we want to reduce this time.

So Is there any faster approach to get titles of all sub-sites.

  • How are you retrieving the sub site names? Are you looping through each subsite to get child or using search(=>will give you better performance)? – Unnie Sep 20 '16 at 14:45
  • Thank Unnie for reply. Currently i am looping through each subsite and getting their title. I want all subsites titles in array on page load. So how can we achieve this using 'Search'. Can you please provide some code. – SP Developer Sep 20 '16 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.