1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

API Slow on my end

Discussion in 'Census: General Discussion' started by FrenchBread, Jan 5, 2014.

  1. FrenchBread

    FrenchBread Guest

    Hey all I am curious when I view the API here is an example url http://census.daybreakgames.com/get/ps2/single_character_by_id/?character_id=5428029729515051201

    here is how long it takes to view
    • single_character_by_id-ms: <span style="color: blue">46,
    • total-ms: <span style="color: blue">46
    <span style="color: #0000ff">BUT when I port that to my site via php/json_decode it takes a bit longer :( is there any way to make this faster on my end ???
    <span style="color: #0000ff">Thanks!
     
  2. Dedith

    Dedith Guest

    well, json_decode takes some time to process to. It's converting all the json data into a php object. There are many things involved here to, the latency between your host and the census.daybreakgames.com server(s), the resources of the machine on your host, etc.
     
  3. airmetforums

    airmetforums Guest

    The total-ms value in the response is the time it took from when the request was received on the server till when the response is written by the server. That doesn't include travel time for the request/response or any of the parsing time in your application. In order to speed things up I encourage you to tailor your queries to only return the information you need. Doing so will make all the stages faster, less data to query from the dbs at the census server, less data to send to you, and less data for you to parse. If you can list what fields you need I can help you come up with an effeicent query.
     

Share This Page