Hello!
I’m using CloudCode to obfuscate some endpoints. The module itself is pretty simple- it takes a string in and returns a different string based on a switch statement.
When I launch the game (PC & Steam) via editor or full build, I end up waiting anywhere from 6-15 seconds to get the first response back on the function that requests that string.
Further uses of that function seem to come back nearly instantly. And, if I close and relaunch (or stop and restart the editor), there’s a good chance the time will drop significantly for the first request- though I still see extended first-run times randomly.
Is this expected? Or is there something I can do to ‘pre-warm’ the code? I currently use it just after player sign-in.
Simplified Engine Code:
try{
Debug.Log("Getting Cloud Code item: " + _str); // Gives me a "start" time for a given call
NetHandlerBindings module = new NetHandlerBindings(CloudCodeService.Instance);
_target = await module.GetAssociatedStr(_str);
Debug.Log("Cloud code finished: " + _str); // Gives me a end time for the call.
return _target;
}
Simplified Cloud Code:
public string GetAssociatedStr(string _str)
{
switch (_str)
{
case "abc":
return abcStr;
// continues with other switch cases, aprx 10 in total
Any help on this is really appreciated!