I've been doing some informal testing of MakeRequest and it appears that sometimes responses are very slow (as much as 10 seconds according to FireBug. My application returns fairly small JSON objects to which I've included a execution time parameter, which I calculate by using the elapsed time to generate the file I send. I'm noticing some very long latency as a result from what I can only assume is coming from MySpace's proxy. In the three examples below, you'll see 2 are fast, but one is VERY slow. It also appears to get worse later in the day, perhaps corresponding to load?
Examples:
Signed post request using makeRequest()
Returns: 104 bytes of JSON encoded data. Execution time at my server <1s
Firebug response time: 9,553ms (very bad!)
Signed post request using makeRequest()
Returns: 1,990 bytes of JSON encoded data. Execution time at my server <1s
Firebug reponse time: 807ms
Signed post request using makeRequest()
Returns: 2901 bytes of JSON encoded data. Execution tim at my server <2s
Firebug response time: 1,549ms
How I calculate elapsed time:
<?php
$s = microtime(true);
// do my work
$elapsed = number_format(microtime(true)-$s)/100) . "ms";
// echo || print the response
?>