3

I currently have an HTML5 web app that utilizes localstorage/websql/app cache.

Now that the database size has grown to around 12MB, the queries that are returning 1000s of records at a time are causing long load times. The client does not want to use paging which would solve this problem, but it looks like I will have to load a small subset of the data and then load the rest. But I was curious if anyone had any other ideas/approaches that might speed up the large queries via caching or some other type of optimization.

Platform:iPad 1/2

Fostah
  • 2,947
  • 4
  • 56
  • 78

1 Answers1

2

How about infinite scrolling instead of pagination? We've used it to great effect at https://gg.com/blogs/

As far as optimisation goes, could you load 100 records at a time instead? When you get the first 100, fire a call to fetch the next 100 and so on until you're done?

Howard
  • 3,855
  • 1
  • 15
  • 12
  • I was thinking about infinite scrolling. That could be the answer. Thanks! – Fostah Feb 16 '12 at 21:51
  • 1
    The only thing you have to watch out for is that the infinite scrolling doesn't stop people reaching the footer of the page; we've mitigated against that on GG by displaying a "Load more" bar if the user scrolls quite far. Actually another thing is that infinite scrolling only makes sense if users won't want to, eg, go right to the end, or skip about to random pages. – Howard Feb 16 '12 at 22:37