Let's say a client
makes a GET
call to the server
to get all the followers
of some user. now the client shows a list of all the followers but the only data the list needs is:
{"username" : "user", "thumbUrl" : "http:/www.example.com/photo/1", "age" : 78}
now the user can click on one of the followers and he can see more data about the follower he clicked.
My question: should i bring from advance all the followers data from the server (full User
Object) vs bring only partial data and then make another call onDemand
when the userclicks a follower. And more important is if do i really need to care about such optimizations?
assumptions:
- data is throttled (10 Objects per call to followers)
- size of each User Object is around 1kb, partial around 200 bytes
- User usually clicks on 5 followers for each 10 Objects.
Points of Interest:
- size saved: about
10kb - 2kb - 5kb = 3kb
per bucket of 10 users. is it negligible at this age of the internet? would it matter if the size difference was 30kb? - bucket size: I gave examples with low bucket size but let's sat my bucket size can get up to
2Mb
. Does it matter if my bucket size is2Mb
with the full User data vs 400kb with partial call? Is it slower? (Assuming the User will click enough followers to make the size difference negligible - Will welcome any other points of interest