

Ask HN: How do you handle data that needs to be loaded in chunks? - isanneh

Hello Hners, 
I am thinking of starting a blog where I would write articles on tech related topics (best practices, lessons learnt, approaches used to solve and design solutions to problems, etc) based on surveys from developers who have experience with the topics I&#x27;d be addressing.<p>I&#x27;d like to start with the following topic: Loading data in chucks.<p>I&#x27;m sure all of you have been to sites where all of the data is not loaded at once.  More data is either loaded automatically as you scroll to the bottom of the page or there is a button that you can click to load more data.<p>For those of you who have added this feature to a site you worked on, can you please take a moment to answer the following questions?  You can write your responses as comments or use the google docs form I created: https:&#x2F;&#x2F;docs.google.com&#x2F;forms&#x2F;d&#x2F;1p0428UJCp80CqHjNMHp-U1LuG5iKAk_WqDPFhRUI-4o&#x2F;viewform?usp=send_form<p>1. Did you prefetch all the data at once, and then append chunks of data to the page as needed? Why or why not?<p>2. Did you run a query to fetch data from the database each time more data needed to be loaded? Why or why not?<p>3. Did you use another method apart from the two types listed above? If yes, can you please explain your method?<p>4. How did you determine the starting point of the next query? (only applicable if you answered yes to 2nd question)<p>5. How did you deal with such situations where data is subject to change? (only applicable if you answered yes to 2nd question)
For example, a collection of articles sorted by the number of &#x27;likes&#x27; each article has, and loaded in chunks of 2.  (1) Number of likes of each article before 1st query  (article1: 10 likes, article2: 7 likes,  article3: 3 likes, article4: 1 like) (2) Number of likes of each article before 2nd query  (article1:10 likes, article2: 7 likes, article3: 25 likes,  article4: 5 likes)<p>6. What database did you use?
======
isanneh
7\. Provide your details if you want to be added to the contributors' list:
Full Name, Link to Blog/Personal Site/ Twitter profile/ Github/ Bitbucket, etc
(optional).

Clickable:
[https://docs.google.com/forms/d/1p0428UJCp80CqHjNMHp-U1LuG5i...](https://docs.google.com/forms/d/1p0428UJCp80CqHjNMHp-U1LuG5iKAk_WqDPFhRUI-4o/viewform?usp=send_form)

You can submit your email address here
[https://docs.google.com/forms/d/1TDPbZGNaOxemsCwvHVH3xzND1h4...](https://docs.google.com/forms/d/1TDPbZGNaOxemsCwvHVH3xzND1h4qm9dIpB6IPGd40lw/viewform?usp=send_form)
if you are interested in participating in these surveys, or you'd like to be
notified when I publish the article I'm writing.

Thank you for your time!

