[iOS] Mobile AlliCrab for WaniKani

…from the other thread:

iamcosta said…Hey, I’ve been testing this for a few days now and am really enjoying it.

A couple of comments;
1) It seems to take a long time to load after every session. Not sure if this is the app being slow or wanikani itself but why does it need to check vocabulary, etc, etc after every refresh??
2) The only thing I miss about the old app done by Kyle that got taken off the app store is the part that tells me the prediction for how long it will take me to level up. Would be a nice addition imo.

Anyway, minor quibbles. Really appreciate your effort. The app is beautiful. 
The radical, kanji and vocabulary data contain not only the actual items but also the review stats, such as when it was unlocked and when the next review is due.  This information is used to create the review timeline and schedule local badge number notifications.  I intend to use this for other purposes as well, like showing the review progress of current level radicals and kanji that are not yet Guru and adding level duration statistics like your second request.  Because I don’t have any servers, I need to download the data directly to the app itself.  The time taken could be due to a variety of factors.  I find for me the refresh takes about 15 seconds, but I’m pretty low level so it’s not downloading a large quantity of data.  Most of this time spent for me is waiting for the WaniKani servers to respond.  Looking at the status bar at the bottom, if you see delays when the bottom label says “Connecting”, this is waiting for the WaniKani servers to respond.  If you see delays at “Parsing” or “Finishing”, this is the app.  If you see delays at “Waiting”, these are intentional pauses.

When you open the app, the study queue is downloaded if a quarter-hour boundary has been crossed since the last time the study queue was refreshed.  So if, for example, the last refresh was 9:04, it won’t try to refresh again until after 9:15 (plus a random number of seconds).  The study queue contains the number of outstanding lessons and reviews, plus counts for reviews in the next hour and the next day.  When the study queue is fetched, if these numbers haven’t changed since the last refresh no other data is requested, the refresh stops there.  If any of these numbers has changed, then everything gets downloaded.  This is a pretty naive approach and one I intend to improve.  In addition to the check every quarter hour, when you return to the dashboard after starting a review or lesson sesson, it waits 5 seconds, then everything is downloaded.  (The delay is there so that if you do reviews then immediately do lessons it’s not downloading data just to throw it away when the lessons are done.)