i have project needs fetch data xml api, i'm using php's curl data api. data download follows
- 1 request fetch data, 123kb file
- 1 request data specific info 600 bytes file
- 1..10 request images (max 170kb files)
in order , nested bottom top, data obtained school, activity calendar , image gallery
so see, there 12 curl request top
i have debugged application logic, , delay once data on memory perform operations 3 secs.
the timing obtained curl_getinfo follows
{ "url":"the url", "content_type":"text\/xml; charset=iso-8859-1", "http_code":200, "header_size":222, "request_size":600, "filetime":-1, "ssl_verify_result":0, "redirect_count":0, "total_time":0.942642, "namelookup_time":8.4e-5, "connect_time":0.179581, "pretransfer_time":0.17966, "size_upload":326, "size_download":12720, "speed_download":13493, "speed_upload":345, "download_content_length":-1, "upload_content_length":326, "starttransfer_time":0.576183, "redirect_time":0, "redirect_url":"", "primary_ip":"81.93.213.42", "certinfo":[ ], "primary_port":80, "local_ip":"192.169.233.75", "local_port":43479 } this data encoded json, because putted on log server.
so question why if curl takes 1s response api , logic executed between 2 , 3 seconds response has time of 1 min, next 50s???
one thing notice website runs on godaddy, vps under https , api runs on http, has do?
thanks in advance
resolved, server delaying download of data curl requests, spoke hosting provider , removed delay downloads. curl requests delayed server, not code or curl handle itself. comments.
Comments
Post a Comment