jdgamble555
01/01/2022, 5:41 PMScott P
01/01/2022, 6:04 PMselect()
, and then setup a subscription to listen to changes afterwards. Depending on your UI framework and whether it loads while scrolling (as opposed to rendering everything, including items that are offscreen), this might be the most performant option.
Periodic polling might be another option as you're reducing the amount of traffic down to predictable patterns and it provides you with a great level of control of performance depending on how your backend infrastructure is handling the load. For example, if there's 4 likes on a post, and a user clicks it, what usually happens is the users UI will be updated to display 5 immediately. The user doesn't necessarily care immediately that another 2 people have liked the post, and getting that information when the next poll tick occurs a few seconds or a minute later is usually sufficient to create a smooth experience.jdgamble555
01/01/2022, 7:25 PM