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.