Forum Discussion
SharePoint Restcalls slow with accpeted languages
I just discovered that if you try to call the SharePoint online REST services to get e.g. information about the fields-schema the call duration is much worse if you accept any other language than en-US.
https://[yousharepointsite].sharepoint.com/_api/web/getList('[listurl])/fields
By default the header
"accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7"
is set. Duration of the call between 4-11 seconds.
But if you just remove the "accept-language" header (or clear it), the duration of the call is between 0.5-2 seconds.
Ok, translations can have an impact the duration duration of the call, but more than 4 times slower is a little bit to much and has direct impact on the user experience.
Is there a way to make the calls faster but still get translated titles etc.?
The same applies to calls like
/_api/web/GetList(@listUrl)/RenderListDataAsStream?...
and any other call I tested (also used SharePoint PnP to test this).