Open tom-daly opened 2 months ago
@patrikhellgren just a guess without any proof: Could this be a side effect of the audience targeting in the verticals?
@kasperbolarsen After checking the code it doesn't seem to have anything to do with that. I can reproduce the issue but not all the time so I will have a look at what could be causing this and post back here.
Version used Ex: 4.13.1.0
Describe the bug The more verticals and more results on the page the webparts multiplies the number of calls to _api/site?$select=IsHubSite,HubSiteId,Id
This is resulting in very long search times for highly customized pages.
To Reproduce 1 Search Box & 1 Results = 1 call
1 Search Box, 1 Search Vertical [All] & 1 Results [Configured to all Vertical] = 4 calls
1 Search Box, 7 Search Verticals & 7 Results [1 per vertical] = 37 calls
I've tried default webparts with no special queries and its the same the number of calls seems to multiply but the number of items.
switch vertical - it makes 16 more requests
Expected behavior when the webpart is loaded grab this value ahead of time or cache it.
Screenshots see above
Desktop (please complete the following information):
Additional context