Re: stream_get_contents() quite slow
| From: | Francois Aichelbaum | Date: | Tue, 13 Mar 2007 08:10:39 +0000 |
| Subject: | Re: stream_get_contents() quite slow | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250396@lists.php.net to get a copy of this message | ||
I doubt that's the reason :
- it's working over the loopback interface
- links and wget don't have any latence issues
Nicholas Yim a écrit :
> Hello Francois Aichelbaum,
>
> mainly due to the slow network speed
>
> Best regards,
>
> ======= At 2007-03-13, 04:02:41 you wrote: =======
>
>
>> Hi guys,
>>
>> I'm using stream_get_contents() to parse content of an HTTP session I
>> opened with fsockopen. My requests headers is just fine and transmission
>> is OK : (0.0007s)
>>
>> But when I read the HTTP answer with stream_get_contents(), it lasts
>> about 2.5s !
>> The webpage is about 5 kB.
>>
>> The connection is opened on the box and ... itself. I use some OpenVZ on
>> the machine. If I use links on commandline to test speed (or even ab)
>> the webpage is loaded about 0.6s !
>>
>> But I need to use stream_get_contents() to continue on the opened
>> connection to get the response of my specific request.
>>
>> I don't know where to look for about this slow down...
>>
>> Regards,
>> Francois.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
> = = = = = = = = = = = = = = = = = = = =
>
> Nicholas Yim
> nick.yim@taowap.com
> 2007-03-13
>
>