CMPUT301F13T03/adventure.datetime — pull request #86 by jviau (2013-11-24 23:38:17+00:00)
Title: Thumbnail and WebStorage changes/fixes

Story thumbnail has been changed to be a Base64 string internally. Call Story.decodeThumbnail() to get it as a Bitmap. This caches it internally, so subsequent calls return the same thumbnail. Setting the thumbnail will cause it to be re-generated on the next decode call. The cached thumbnail and its dirty bool are "transient", they will not be serialized (as in json).

I found that ElasticSearch defaults to returning only 10 items in a search. So I implemented paging on all the queries in WebStorage() (sorry Evan, have fun hooking it up). Each query call takes in a "from" and a "size". I suggest starting with from=0 and size=10, then if you want more do from=10, size=10. Keep doing that as needed until the amount returned is < size.

This will allow us to implement proper paging in the view. Load the first 10 Stories or comments, then when the user scrolls to the bottom load the next 10 and so on.

The thumbnail change combined with paging should hopefully fix our out of memory issue. If not I will look into further changes.