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

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

2 Comments

I was thinking about infinite scrolling. That could be the answer. Thanks!
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.