Saturday, March 28, 2009

Character Updating

Character updating sort of works at the moment. However, there is still the issue of skills in training and this is where my knowledge of the matter is hazy.

When a skill completes training in-game, there is a small delay in which the skill training is finalizing. I've seen this delay be instant up to 30 seconds. What I don't want to be doing is querying the data so often as to bog down the API server. Is there a formula to determine exactly how long this delay is? From my readings online, the character sheet and skill in training XML files both use a short cache style, each with an hour in between cache expirations. However, whenever I make a change in-game and query a new XML file before a supposed cache expiration, the changes are reflected in the new XML files. Am I misreading something or is the information I have out of date?

That being said, there's also the issue of updating character information. Currently, on my computer, whenever I do an update on a character's skills there is a 2-4 seconds pause in the app where it locks up. This is because all the processing is done on the main thread. For now it's something I can live with. However, if a player is handling multiple characters, each with a large set of skills, then this delay may end up turning into an unacceptable 15-20 second delay. I'm really dreading having to move all the core data updating on a separate thread. All my readings indicate that Core Data just isn't easy to work with in a multi-threaded environment.

Just stuff for me to think about while I continue on with my work.

3 comments:

  1. If you have anyone but yourself use the code, you are probably going to want to do the multi threaded or operation thing. If you do anything that requires repeated look-ups on the invTypes, mapDenormalize, or other large static data table, I think you will find the delay unacceptable.

    I have one character that has ~1500 assets. Not really uncommon. Doing a type and location lookup on all of these takes a while. The invTypes table has 16K+ types and the mapDenormalize table has 360K+ locations. That's a lot of work... But, if you are only looking at skills, you might be ok.

    Good luck!

    ReplyDelete
  2. are the CharacterDataController and EveAPISkillInTraining files missing from the svn? i dl'ed the tarball, but there weren't there.

    ReplyDelete
  3. Thanks for the heads up. Sorry, I'm a bit rusty with version control commands and forgot that brand new files need to be added since a simple commit command won't do it.

    ReplyDelete