php - Api request JSON slow preformance -


hi i'm calling api species database called encyclopedia of life. call method called search, renders 30 results (i call method 1 below), 30 results call method gives me info each of results, call method 30 results , slow. suggestions have make these api calls faster? thank you

$jsonurls = 'http://eol.org/api/pages/1.0/'.$id.'.json?images=2&videos=0&sounds=0&maps=0&text=2&iucn=false&subjects=overview&licenses=all&details=true&common_names=true&synonyms=true&references=true'; $jsons = file_get_contents($jsonurls,0,null,null); $responsetaxobjects = json_decode($jsons);  //then run through object array  foreach($responsetaxobjects->taxonconcepts $sources){ } 

have tried specifying header

accept-encoding: gzip 

? return results in compressed form, may save wire time. unfortunately, doesn't api provides way full details search results, out of luck in terms of reducing number of round trips on wire. have cache setting can play if you're going wind geting same pages multiple times.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -