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

Resolving Statistics in Character Collection Computationally Expensive?

Discussion in 'Census: General Discussion' started by Dark_Grue, Jan 17, 2012.

  1. Dark_Grue

    Dark_Grue Guest

    I tried implementing the c:resolve=statistics command, but the character collection went from 139.69 kilobytes taking 0.5416 sec, to 194.17 kilobytes and 22.7123 sec.

    The extra data being transferred doesn't seem to account for the vast increase for the query to return, is resolving the statistics very computationally expensive?

     
  2. DanKinney

    DanKinney Guest

    It shouldn't be.  We pre-compute the statistics.  

    What is your exact query?

    -dan

     
  3. Dark_Grue

    Dark_Grue Guest

    I'm building the query in PHP, looks like so:

    Code:
    $config['xml_roster_url'] = 'census.daybreakgames.com/xml/get/eq2/character/?guild.id='.$config['guild_id']   .'&c:limit=999'   .'&c:show='   .'visible,'   .'playedtime,'   .'last_update,'   .'dbid,'   .'pvp,'   .'secondarytradeskills,'   .'statistics,'   .'type,'   .'tradeskills,'   .'locationdata,'   .'arena,'   .'guild.status,'   .'guild.joined,'   .'guild.rank,'   .'name,'   .'collections,'   .'quests'   .'&c:resolve=statistics';
    Specifically,

    census.daybreakgames.com/xml/get/eq2/cha...olve=statistics

    Just adding the "&c:resolve=statistics" on the end adds an additional 22 seconds to the time it take to get an XML response. Taking it off, back to about half a second.

     
  4. DanKinney

    DanKinney Guest

    I don't think it is computationally expensive, but there is a performance hit.

    In testing this week, we believe that we need to bump up the RAM on the database server quite a bit.  That should have a direct impact on this (and many others) query.

    -dan

     
  5. Dark_Grue

    Dark_Grue Guest

    Look forward to hearing when the upgrades are complete.

    Right now, what I do is set a time threshold, and on page requests, see if the timer has expired. If it has, I run a XML request and parse it into the DB before returning the page. Going from .5 sec to 22.7 sec to return the page would make resolving statistics... unpalatable for whomever did a page request at that time. I could run a cron job to do refreshes in the background, which works for me, but a lot of people on hosted services can't do things like that, and I'm trying to make RM4DF as accessible as possible.

    Hopefully the upgrades will bring those queries back into the same performance band as before... guess I'll have to wait and see.

    Thanks!

     
  6. DanKinney

    DanKinney Guest

    Understood Dark_Grue.

    The upgrade should make a rather dramatic improvement.  Any online transaction that is more than a couple of seconds (much less 22) is unacceptable.  We can do better than that.

    -dan

     

Share This Page