seems like many apps do lots of unnecessary reloading of content from the net. Well, when you first start on an app and you've never done this type of xml based data retrieval programming before, thinking this out is probably not as high a priority as learning and writing the app. I'm contemplating how to bolt a caching system onto the top of my app so that stuff only gets reloaded from the net when requested the first time, or the app is first loaded. If you can imagine what the cumulative cost of hundreds or thousands of clients with a poor caching system is for a company like YouTube for instance, or Netflix you can imagine that at some point unnecessary reloading is costing a hugh amount of money, which someone is paying for somewhere...
I'm not talking about predictive caching, but just storing information locally and only reloading when necessary.
Some ideas off the top of my head:
Use a separate posterlist variable for each category on your poster screen. Storing each posterlist in an roArray means you can use msg.Getindex() of posterscreen to select the to select the already loaded Posterlist:
- Code: Select all
listone=loadsearchitems() 'preload the title, description, URL's of searchItems
listtwo=loadfavoriteitems() 'same thing for favorite items
There may be errors in the above, since I just wrote it off the top of my head, but maybe you get the idea of what I'm thinking of.
Some mechanism for determining when a user has requested to load the data for the first time and when they are trying to look at the same data again has to be worked out. That's what I'm thinking about now for my own app.
Now of course, That only covers caching xml and posteritems, not the artwork and data files that come over. Well, assuming the artwork files aren't that big, one could probably save that to local memory or USB if they have it, and reload it from there, of course, there would need to be some way to wipe it out, probably want to do that when the app is loaded or better, when the accumulated pile of files is greater than a certain amount, or older than a certain date. Something like
- Code: Select all
if imageAge <> tooOld then
to try to throw together a quickee example from the top of my head....
So any philosophical comments?