Hacker News new | ask | show | jobs
by geekrax 1107 days ago
Not really "a lot". When you think about providing absolutely best user experience, you gotta leave the engineering efficiencies out at the doors and live with the redundant API calls. The over optimization often comes with sacrificing the UX.
1 comments

It’s possible to make fewer requests without negatively impacting the user experience. For example, batching requests would result in a more responsive app.
He specifically cited situations where the opposite is true - for example when first opening a subreddit, he requests only 25 posts so the UI can render something quickly, then requests a further 100 posts to prepare for the user scrolling.

He could just request 100 posts first, halving the API requests, but the app would be less responsive.

Your comments seem to have a confidence level that their content doesn't justify.

That’s a great example of something that could be optimized without impacting the user experience. For example, just request the next page of posts when the user starts to reach the bottom. The reason for my confidence is that I’ve worked with Reddit’s API before and I know exactly where the pitfalls are.
> when the user starts to reach the bottom

That’s too late to be sending the request if you want the premium feeling of no loading times while scrolling, especially if you also want to do rich thumbnails of media.