SharePoint Restcalls slow with accpeted languages

%3CLINGO-SUB%20id%3D%22lingo-sub-1206330%22%20slang%3D%22de-DE%22%3ESharePoint%20Restcalls%20slow%20with%20accpeted%20languages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1206330%22%20slang%3D%22de-DE%22%3E%3CP%3EI%20just%20discovered%20that%20if%20you%20try%20to%20call%20the%20SharePoint%20online%20REST%20services%20to%20get%20e.g.%20information%20about%20the%20fields-schema%20the%20call%20duration%20is%20much%20worse%20if%20you%20accept%20any%20other%20language%20than%20en-US.%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2F%5Byousharepointsite%5D.sharepoint.com%2F_api%2Fweb%2FgetList('%5Blisturl%5D)%2Ffields%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2F%5Byousharepointsite%5D.sharepoint.com%2F_api%2Fweb%2FgetList('%5Blisturl%5D)%2Ffields%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBy%20default%20the%20header%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%22accept-language%3A%20de-DE%2Cde%3Bq%3D0.9%2Cen-US%3Bq%3D0.8%2Cen%3Bq%3D0.7%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eis%20set.%20Duration%20of%20the%20call%20between%204-11%20seconds.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBut%20if%20you%20just%20remove%20the%20%22accept-language%22%20header%20(or%20clear%20it)%2C%20the%20duration%20of%20the%20call%20is%20between%200.5-2%20seconds.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOk%2C%20translations%20can%20have%20an%20impact%20the%20duration%20of%20the%20call%2C%20but%20more%20than%204%20times%20slower%20is%20a%20little%20bit%20to%20much%20and%20has%20direct%20impact%20on%20the%20user%20experience.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20a%20way%20to%20make%20the%20calls%20faster%20but%20still%20get%20translated%20titles%20etc.%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20same%20applies%20to%20calls%20like%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F_api%2Fweb%2FGetList(%40listUrl)%2FRenderListDataAsStream%3F...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eand%20any%20other%20call%20I%20tested%20(also%20used%20SharePoint%20PnP%20to%20test%20this).%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1206330%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EApis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnp%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EResponsive%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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).

0 Replies