HTTP requests: Why does it lag?
Posted: 27 Nov 2019, 22:57
I won't go as big as the Map Editor API: Items and ghost blocks topic this time.
I've noticed some strange behavior when using the HTTP functions in CHttpManager while I was implementing playsessions into Challenge.
Calling a request creates a split second lag on the client. This is usually fine in the menu, but it really sucks when used in Solo script for example. Because when the request is called during the race, the lag in the middle of the race is created as well, interrupting the user experience. The lag intensity apparently depends also on user connection (in some way).
Also, from the evidence of other ManiaScripter, the lag also affect servers, so it's probably not a client-sided issue. Something seems to block the game loop.
Also, not sure if this is alright, but requests that take usually 30 milliseconds in internet browser, take like 130 when called in Maniaplanet (tested via Now variable). It's probably not wrong but may give an idea of why does it happen.
Little offtopic: Can anyone test the CreatePostFile function? I can't get it to work and it may not actually work.
I've noticed some strange behavior when using the HTTP functions in CHttpManager while I was implementing playsessions into Challenge.
Calling a request creates a split second lag on the client. This is usually fine in the menu, but it really sucks when used in Solo script for example. Because when the request is called during the race, the lag in the middle of the race is created as well, interrupting the user experience. The lag intensity apparently depends also on user connection (in some way).
Also, from the evidence of other ManiaScripter, the lag also affect servers, so it's probably not a client-sided issue. Something seems to block the game loop.
Also, not sure if this is alright, but requests that take usually 30 milliseconds in internet browser, take like 130 when called in Maniaplanet (tested via Now variable). It's probably not wrong but may give an idea of why does it happen.
Little offtopic: Can anyone test the CreatePostFile function? I can't get it to work and it may not actually work.