Issue with WWW-Class' slow response time

I’ve some troubles finding the reason why my WWW-Request take so long

WWW www = new WWW(Url);
StartCoroutine(WaitForRequest(www));   


private IEnumerator WaitForRequest(WWW www)
{	
	Debug.Log("instant...");
    yield return www;
	Debug.Log("...5 seconds later");
    if (www.error == null)       
        ParseResponse(www.text);        
    else
        Debug.Log("WWW Error:

" + www.error);
}

I just made a simple Call to my php-server (which response within milliseconds to requests made via browser) and it took about 5 seconds everytime until i get the data.

Is this the normal behavior of the WWW-class or is it possible to accelerate the response time?

2 Answers

2

The problem is caused by multiple network adapter.

unity seems to go through each one (every single request) until it got a response.

Recovering a post almost year and a half old, with Unity 5. I'm seeing the very same problem. I have a super slow answer from the WWW class (3 seconds or so) in a multiple NIC system from a server in my local network. Is this a known issue with multiple NICs?

Use the .Net method instead, it should cut down the response time in half.